diff --git a/src/components/map/Gpx.tsx b/src/components/map/Gpx.tsx
index d79ea8f..7bf625f 100644
--- a/src/components/map/Gpx.tsx
+++ b/src/components/map/Gpx.tsx
@@ -6,7 +6,6 @@ import { lat2tile, lon2tile } from '../../lib/geo';
import { zoom0 } from '../../store/map';
const Gpx: React.FC<{ gpx: any }> = (props) => {
-
var trkpts: any[] = [];
trkpts = useFind({
@@ -18,14 +17,19 @@ const Gpx: React.FC<{ gpx: any }> = (props) => {
// use_index: 'type-trkpt-gpx-time3',
});
- console.log(`rendering gpx, subtype:"${props.gpx.subtype}", ${trkpts.length} points`);
-
+ console.log(
+ `rendering gpx, subtype:"${props.gpx.subtype}", ${trkpts.length} points`
+ );
trkpts.sort((first: any, second: any) =>
first.trkpt.time.localeCompare(second.trkpt.time)
);
-// console.log(`gpx: ${JSON.stringify(props.gpx)}`);
+ const clickHandler = (event: any) => {
+ console.log(`gpx (${JSON.stringify(props.gpx)}) clicked.`);
+ };
+
+ // console.log(`gpx: ${JSON.stringify(props.gpx)}`);
const d = trkpts.reduce((previous: string, current: any, index: number) => {
const action = index === 0 ? 'M' : index === 1 ? 'L' : '';
@@ -36,7 +40,13 @@ const Gpx: React.FC<{ gpx: any }> = (props) => {
)}`;
}, '');
- return ;
+ return (
+
+ );
};
export default Gpx;
diff --git a/src/components/map/TracksBrowser.tsx b/src/components/map/TracksBrowser.tsx
index 47c6b4d..062fb5e 100644
--- a/src/components/map/TracksBrowser.tsx
+++ b/src/components/map/TracksBrowser.tsx
@@ -40,6 +40,7 @@ const TrackBrowser: React.FC<{}> = () => {