From a212841c6c1e5d6d5cc691b615cae348d38955b5 Mon Sep 17 00:00:00 2001 From: evlist Date: Fri, 23 Sep 2022 15:01:02 +0200 Subject: [PATCH] Supporting multiple tracks. --- .../tracks/week-end_daily_2022-08-26.gpx | 3598 ----------------- src/components/map/map.tsx | 3 +- src/components/map/track.tsx | 35 +- src/components/map/tracks.tsx | 36 + src/store/map.ts | 2 +- src/theme/map.css | 2 +- 6 files changed, 54 insertions(+), 3622 deletions(-) delete mode 100644 public/assets/tracks/week-end_daily_2022-08-26.gpx create mode 100644 src/components/map/tracks.tsx diff --git a/public/assets/tracks/week-end_daily_2022-08-26.gpx b/public/assets/tracks/week-end_daily_2022-08-26.gpx deleted file mode 100644 index 812b520..0000000 --- a/public/assets/tracks/week-end_daily_2022-08-26.gpx +++ /dev/null @@ -1,3598 +0,0 @@ - - - - - week-end - 4 devices - - - Gisèle et Éric (vélo) - - - - 58.90 - 10 - - 0.000 - 12.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 38.91 - 12 - - 0.000 - 6.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 73.73 - 5 - - 12.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 78.41 - 5 - - 24.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 67.92 - 4 - - 1.50 - 95.00 - PhoneTrack/0.1.0 - - - - - 64.46 - 5 - - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 62.69 - 8 - - 0.000 - 3.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 64.41 - 6 - - 0.000 - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 57.83 - 6 - - 6.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 63.74 - 6 - - 8.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 62.88 - 5 - - 0.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 57.60 - 4 - - 0.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 54.72 - 5 - - 1.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 69.14 - 5 - - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 66.69 - 6 - - 6.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 70.48 - 6 - - 0.000 - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 74.62 - 7 - - 0.000 - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 59.88 - 6 - - 12.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 64.28 - 7 - - 8.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 61.01 - 10 - - 4.132 - 148.790 - 6.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 59.42 - 27 - - 4.157 - 135.710 - 4.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 49.23 - 9 - - 3.855 - 121.580 - 16.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 62.10 - 10 - - 3.791 - 133.320 - 8.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 59.29 - 10 - - 4.596 - 126.040 - 12.00 - 95.00 - PhoneTrack/0.1.0 - - - - - 62.08 - 11 - - 4.156 - 136.620 - 16.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 64.16 - 11 - - 4.345 - 128.070 - 16.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 56.59 - 12 - - 2.373 - 146.700 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 64.64 - 11 - - 3.970 - 140.540 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 53.05 - 12 - - 3.618 - 164.260 - 4.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 60.98 - 10 - - 3.394 - 166.770 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 55.22 - 10 - - 3.627 - 161.240 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 61.68 - 11 - - 4.799 - 167.480 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 58.44 - 12 - - 4.015 - 179.470 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 60.99 - 11 - - 2.642 - 89.270 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 63.04 - 10 - - 4.606 - 126.130 - 16.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 56.88 - 12 - - 5.271 - 105.970 - 6.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 53.48 - 12 - - 4.978 - 156.380 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 52.17 - 12 - - 4.897 - 175.320 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 61.91 - 12 - - 4.556 - 174.140 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 55.38 - 11 - - 4.681 - 150.350 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 58.55 - 11 - - 5.063 - 143.430 - 16.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 54.47 - 9 - - 5.308 - 146.850 - 16.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 59.93 - 12 - - 5.073 - 134.010 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 55.14 - 12 - - 4.387 - 75.850 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 57.17 - 10 - - 4.913 - 83.830 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 54.21 - 10 - - 6.026 - 82.340 - 4.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 61.55 - 12 - - 6.702 - 84.300 - 6.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 50.94 - 12 - - 6.199 - 160.010 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 50.40 - 11 - - 5.676 - 162.640 - 6.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 58.76 - 12 - - 3.655 - 159.770 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 54.72 - 10 - - 2.901 - 151.950 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 53.45 - 10 - - 5.016 - 78.600 - 6.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 47.12 - 9 - - 5.520 - 116.510 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 48.20 - 12 - - 4.912 - 134.020 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 56.16 - 10 - - 5.417 - 133.520 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 48.25 - 9 - - 0.000 - 12.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 52.99 - 11 - - 2.193 - 154.800 - 8.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 51.17 - 10 - - 3.735 - 190.750 - 24.00 - 94.00 - PhoneTrack/0.1.0 - - - - - 51.96 - 12 - - 5.735 - 145.370 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 53.50 - 10 - - 5.837 - 164.720 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 58.35 - 10 - - 5.678 - 146.810 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 58.21 - 10 - - 2.645 - 157.770 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.01 - 11 - - 0.000 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 66.54 - 10 - - 0.000 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 61.73 - 12 - - 5.885 - 322.670 - 4.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 53.85 - 10 - - 4.950 - 243.080 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 54.79 - 10 - - 5.625 - 249.400 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 59.51 - 10 - - 5.438 - 248.930 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.08 - 10 - - 5.366 - 248.220 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.99 - 12 - - 5.705 - 251.150 - 16.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 47.33 - 10 - - 5.077 - 250.540 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 54.41 - 12 - - 4.531 - 245.400 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 51.06 - 11 - - 5.415 - 253.980 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 47.28 - 10 - - 5.406 - 253.740 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 42.71 - 12 - - 5.476 - 252.290 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 49.36 - 12 - - 4.939 - 258.240 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.75 - 10 - - 3.383 - 251.990 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 49.69 - 10 - - 5.273 - 249.410 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 54.87 - 10 - - 5.861 - 248.560 - 24.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 48.61 - 11 - - 6.020 - 246.970 - 4.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 49.61 - 10 - - 5.884 - 250.610 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 48.24 - 11 - - 6.067 - 250.210 - 6.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 54.75 - 10 - - 5.953 - 249.180 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 53.75 - 11 - - 5.688 - 250.160 - 16.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 51.27 - 11 - - 6.533 - 250.050 - 12.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.26 - 10 - - 6.321 - 249.590 - 16.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 46.61 - 12 - - 5.787 - 247.790 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 53.44 - 12 - - 6.109 - 252.000 - 4.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 50.82 - 10 - - 5.948 - 249.230 - 8.00 - 93.00 - PhoneTrack/0.1.0 - - - - - 52.78 - 10 - - 5.779 - 251.420 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 58.88 - 11 - - 0.000 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 56.83 - 12 - - 0.000 - 6.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 51.62 - 11 - - 0.000 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 50.77 - 10 - - 5.607 - 256.960 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 51.45 - 9 - - 5.595 - 254.140 - 16.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 53.03 - 12 - - 5.471 - 249.830 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 47.93 - 12 - - 5.559 - 251.550 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 52.26 - 10 - - 5.576 - 252.540 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 51.02 - 11 - - 5.192 - 252.400 - 16.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 49.13 - 12 - - 5.443 - 251.670 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 50.59 - 10 - - 5.195 - 251.250 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 52.44 - 11 - - 4.871 - 253.500 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 51.21 - 10 - - 4.978 - 253.930 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 49.28 - 9 - - 5.030 - 250.080 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 58.45 - 12 - - 5.300 - 252.660 - 6.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 56.85 - 11 - - 5.113 - 254.940 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 52.97 - 11 - - 5.366 - 253.720 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 53.74 - 10 - - 4.693 - 242.760 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 47.82 - 12 - - 2.537 - 199.790 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 50.22 - 12 - - 4.502 - 126.440 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 55.45 - 10 - - 7.005 - 127.940 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 53.10 - 10 - - 7.236 - 126.120 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 53.40 - 10 - - 7.228 - 126.060 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 55.45 - 11 - - 5.283 - 137.950 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 56.45 - 10 - - 5.988 - 126.480 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 55.04 - 10 - - 5.977 - 126.970 - 12.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 53.08 - 12 - - 4.715 - 104.910 - 6.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 59.08 - 10 - - 4.660 - 74.720 - 8.00 - 92.00 - PhoneTrack/0.1.0 - - - - - 56.89 - 23 - - 3.549 - 94.260 - 4.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 53.85 - 10 - - 0.000 - 24.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 52.53 - 10 - - 1.817 - 167.020 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 55.43 - 10 - - 0.000 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 70.27 - 11 - - 1.204 - 117.830 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 58.00 - 10 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 50.92 - 8 - - 1.421 - 315.080 - 16.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 61.15 - 10 - - 1.623 - 305.230 - 8.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 65.62 - 12 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 58.07 - 11 - - 0.000 - 8.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 52.79 - 10 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 44.95 - 11 - - 0.000 - 24.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 54.24 - 10 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 68.09 - 10 - - 0.000 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 61.17 - 27 - - 0.000 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 70.14 - 12 - - 0.000 - 16.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 46.33 - 12 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 58.97 - 12 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 61.13 - 11 - - 0.000 - 8.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 47.65 - 10 - - 0.000 - 16.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 58.41 - 6 - - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 59.43 - 6 - - 3.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 55.21 - 6 - - 16.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 56.43 - 4 - - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 63.35 - 5 - - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 55.45 - 18 - - 3.411 - 125.040 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 59.16 - 6 - - 24.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 56.45 - 6 - - 24.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 52.05 - 6 - - 24.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 65.00 - 6 - - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 62.18 - 6 - - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 69.51 - 5 - - 8.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 59.27 - 6 - - 16.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 66.06 - 10 - - 0.000 - 6.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 59.85 - 10 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 66.97 - 11 - - 0.000 - 12.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 69.17 - 12 - - 0.000 - 8.00 - 91.00 - PhoneTrack/0.1.0 - - - - - 60.83 - 10 - - 0.000 - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 57.68 - 7 - - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 56.65 - 6 - - 3.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 67.41 - 6 - - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 57.77 - 6 - - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 63.86 - 11 - - 1.239 - 250.170 - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 52.92 - 12 - - 0.000 - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 58.07 - 10 - - 0.000 - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 57.05 - 7 - - 4.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 63.57 - 12 - - 0.000 - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 60.52 - 7 - - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 63.14 - 7 - - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 59.46 - 12 - - 0.000 - 16.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 52.61 - 12 - - 0.000 - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 58.07 - 10 - - 0.000 - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 69.69 - 12 - - 0.000 - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 54.72 - 9 - - 0.000 - 24.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 60.46 - 7 - - 16.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 66.27 - 10 - - 2.902 - 81.700 - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 61.89 - 10 - - 3.573 - 67.200 - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 77.59 - 7 - - 24.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 80.09 - 6 - - 24.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 61.20 - 7 - - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 62.18 - 7 - - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 58.53 - 7 - - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 49.59 - 7 - - 24.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 44.47 - 7 - - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 64.54 - 7 - - 6.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 61.32 - 6 - - 16.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 66.58 - 5 - - 24.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 60.97 - 11 - - 4.408 - 310.760 - 12.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 57.95 - 10 - - 4.058 - 301.480 - 16.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 57.64 - 9 - - 4.074 - 32.780 - 8.00 - 90.00 - PhoneTrack/0.1.0 - - - - - 54.23 - 11 - - 3.577 - 56.810 - 16.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 53.81 - 9 - - 4.478 - 271.680 - 24.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 59.21 - 11 - - 2.646 - 238.770 - 12.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 53.92 - 11 - - 4.249 - 300.990 - 12.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 52.75 - 9 - - 4.661 - 313.070 - 12.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 76.58 - 12 - - 4.704 - 305.170 - 8.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 47.88 - 12 - - 4.179 - 303.220 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 51.20 - 10 - - 4.524 - 306.240 - 16.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 57.21 - 12 - - 4.558 - 304.760 - 8.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 53.19 - 10 - - 4.481 - 308.410 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 52.09 - 11 - - 5.107 - 305.920 - 4.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 60.22 - 9 - - 4.850 - 311.410 - 8.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 53.45 - 10 - - 4.632 - 304.700 - 4.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 60.29 - 9 - - 0.000 - 12.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 66.98 - 12 - - 0.000 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 58.88 - 9 - - 0.000 - 12.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 66.44 - 12 - - 0.000 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 50.00 - 12 - - 0.000 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 53.78 - 11 - - 0.000 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 57.74 - 10 - - 0.000 - 6.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 58.87 - 11 - - 0.000 - 4.00 - 89.00 - PhoneTrack/0.1.0 - - - - - 54.59 - 10 - - 0.000 - 12.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 55.39 - 10 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 65.89 - 12 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 75.27 - 12 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 56.28 - 9 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 57.80 - 10 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 59.47 - 10 - - 0.000 - 12.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 58.98 - 10 - - 0.000 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 56.61 - 12 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 54.86 - 9 - - 0.000 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 66.15 - 12 - - 1.429 - 283.650 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 59.22 - 9 - - 6.460 - 305.930 - 12.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 50.75 - 9 - - 6.414 - 289.410 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 50.76 - 10 - - 5.926 - 281.740 - 4.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 48.79 - 11 - - 4.552 - 280.230 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 54.63 - 11 - - 6.003 - 269.390 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 51.36 - 10 - - 6.284 - 268.620 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 51.19 - 12 - - 6.085 - 269.180 - 16.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 50.68 - 11 - - 6.138 - 279.760 - 4.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 50.13 - 10 - - 6.367 - 301.960 - 12.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 52.43 - 12 - - 6.372 - 316.650 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 51.59 - 10 - - 6.729 - 322.700 - 12.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 54.42 - 10 - - 6.245 - 336.440 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 46.70 - 10 - - 5.966 - 317.170 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 48.04 - 11 - - 5.986 - 317.950 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 50.73 - 12 - - 6.237 - 317.970 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 51.39 - 11 - - 5.704 - 320.140 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 58.20 - 10 - - 6.113 - 327.720 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 49.80 - 11 - - 6.363 - 349.050 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 55.71 - 11 - - 6.510 - 355.910 - 4.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 56.30 - 11 - - 6.440 - 355.310 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 48.61 - 12 - - 6.672 - 356.840 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 52.62 - 10 - - 6.587 - 1.050 - 6.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 52.13 - 11 - - 6.686 - 6.370 - 8.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 49.17 - 12 - - 6.555 - 11.440 - 4.00 - 88.00 - PhoneTrack/0.1.0 - - - - - 49.71 - 10 - - 6.394 - 75.130 - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.80 - 10 - - 6.297 - 74.750 - 4.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 54.14 - 10 - - 2.443 - 63.410 - 4.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 55.24 - 10 - - 3.322 - 142.480 - 4.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 53.69 - 9 - - 2.082 - 67.960 - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 44.41 - 12 - - 4.077 - 29.130 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 50.60 - 12 - - 2.736 - 342.660 - 4.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 46.20 - 12 - - 3.997 - 345.810 - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 52.13 - 11 - - 4.308 - 358.490 - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 51.63 - 10 - - 2.590 - 80.370 - 4.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 50.71 - 10 - - 3.959 - 44.620 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 49.48 - 10 - - 3.377 - 13.570 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 55.07 - 9 - - 4.434 - 311.000 - 24.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.80 - 10 - - 3.451 - 358.500 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.07 - 9 - - 4.347 - 46.920 - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.15 - 10 - - 0.000 - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 48.41 - 7 - - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 50.98 - 7 - - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 50.12 - 6 - - 24.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 49.61 - 7 - - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 58.09 - 6 - - 16.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.47 - 7 - - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 55.08 - 10 - - 3.402 - 59.750 - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 54.95 - 11 - - 4.228 - 63.400 - 8.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 56.36 - 12 - - 4.312 - 68.930 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 49.66 - 12 - - 2.666 - 114.530 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 58.76 - 11 - - 3.973 - 63.410 - 6.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 55.40 - 12 - - 4.878 - 68.040 - 16.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 61.20 - 10 - - 3.052 - 19.670 - 12.00 - 87.00 - PhoneTrack/0.1.0 - - - - - 54.96 - 11 - - 5.342 - 343.550 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 63.45 - 12 - - 4.871 - 347.900 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 56.03 - 10 - - 3.983 - 339.790 - 12.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 56.77 - 10 - - 3.765 - 98.980 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 53.63 - 11 - - 3.076 - 141.230 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 53.88 - 7 - - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 54.01 - 8 - - 24.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 56.17 - 8 - - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 57.82 - 8 - - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 53.49 - 8 - - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 52.72 - 8 - - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 53.10 - 7 - - 8.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 70.46 - 6 - - 24.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 66.56 - 10 - - 0.000 - 16.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 71.34 - 10 - - 2.371 - 44.060 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 69.05 - 9 - - 3.847 - 51.090 - 16.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 66.52 - 9 - - 4.732 - 53.760 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 62.62 - 12 - - 6.747 - 21.290 - 8.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 63.01 - 9 - - 6.028 - 62.390 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 60.97 - 11 - - 6.778 - 81.480 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 57.27 - 11 - - 6.537 - 67.640 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 63.15 - 10 - - 7.914 - 67.650 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 63.60 - 12 - - 6.368 - 87.440 - 8.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 61.01 - 9 - - 4.124 - 52.500 - 24.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 65.22 - 10 - - 4.523 - 59.460 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 66.91 - 9 - - 5.003 - 41.700 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 64.93 - 11 - - 5.103 - 61.120 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 59.82 - 12 - - 3.962 - 56.840 - 4.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 62.50 - 12 - - 3.696 - 53.970 - 12.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 60.86 - 9 - - 4.948 - 59.610 - 16.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 55.46 - 12 - - 6.955 - 106.020 - 6.00 - 86.00 - PhoneTrack/0.1.0 - - - - - 60.83 - 9 - - 8.418 - 83.900 - 8.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 59.70 - 12 - - 3.901 - 330.180 - 12.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 81.22 - 12 - - 0.000 - 6.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 63.54 - 10 - - 0.000 - 24.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 61.32 - 8 - - 8.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 63.49 - 12 - - 0.000 - 24.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 63.91 - 10 - - 0.000 - 12.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 69.39 - 12 - - 0.000 - 8.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 75.16 - 17 - - 0.000 - 16.00 - 85.00 - PhoneTrack/0.1.0 - - - - - 63.46 - 10 - - 0.000 - 6.00 - 85.00 - PhoneTrack/0.1.0 - - - - - \ No newline at end of file diff --git a/src/components/map/map.tsx b/src/components/map/map.tsx index d305ee1..f16d5d2 100644 --- a/src/components/map/map.tsx +++ b/src/components/map/map.tsx @@ -20,6 +20,7 @@ import { import GpxImport from './gpx-import'; import Track from './track'; +import Tracks from './tracks'; const Map: react.FC<{}> = (props: {}) => { const dispatch = useDispatch(); @@ -44,7 +45,7 @@ const Map: react.FC<{}> = (props: {}) => { - + diff --git a/src/components/map/track.tsx b/src/components/map/track.tsx index b9347b2..1a81c96 100644 --- a/src/components/map/track.tsx +++ b/src/components/map/track.tsx @@ -1,30 +1,23 @@ -import React, { Fragment } from 'react'; +import React from 'react'; -import { useSelector } from 'react-redux'; import { lat2tile, lon2tile } from '../../lib/geo'; import { zoom0 } from '../../store/map'; -const Track: React.FC<{}> = () => { - const track = useSelector((state: { tracks: any }) => state.tracks.tracks.$0); +const Track: React.FC<{ track: any }> = (props) => { + const trkseg = props.track.trk[0].trkseg[0]; - if (track) { - const trkseg = track.trk[0].trkseg[0]; + const d = trkseg.trkpt.reduce( + (previous: string, current: any, index: number) => { + const action = index === 0 ? 'M' : index === 1 ? 'L' : ''; + return `${previous} ${action} ${lon2tile( + current.$.lon, + zoom0 + )}, ${lat2tile(current.$.lat, zoom0)}`; + }, + '' + ); - const d = trkseg.trkpt.reduce( - (previous: string, current: any, index: number) => { - const action = index === 0 ? 'M' : index === 1 ? 'L' : ''; - return `${previous} ${action} ${lon2tile( - current.$.lon, - zoom0 - )}, ${lat2tile(current.$.lat, zoom0)}`; - }, - '' - ); - - return ; - } - - return ; + return ; }; export default Track; diff --git a/src/components/map/tracks.tsx b/src/components/map/tracks.tsx new file mode 100644 index 0000000..fffdc93 --- /dev/null +++ b/src/components/map/tracks.tsx @@ -0,0 +1,36 @@ +import React, { Fragment, useEffect } from 'react'; + +import { useSelector } from 'react-redux'; + +import { Drivers, Storage } from '@ionic/storage'; +import * as CordovaSQLiteDriver from 'localforage-cordovasqlitedriver'; + +import Track from './track'; + +var store: Storage; + +const Tracks: React.FC<{}> = () => { + useEffect(() => { + store = new Storage({ + driverOrder: [ + CordovaSQLiteDriver._driver, + Drivers.IndexedDB, + Drivers.LocalStorage, + ], + }); + store + .defineDriver(CordovaSQLiteDriver) + .then(() => console.log('CordovaSQLiteDriver registered')); + }, []); + + const tracks = useSelector((state: { tracks: any }) => state.tracks.tracks); + return ( + + {Object.keys(tracks).map((key: any) => ( + + ))} + + ); +}; + +export default Tracks; diff --git a/src/store/map.ts b/src/store/map.ts index 4431dbf..055ec8a 100644 --- a/src/store/map.ts +++ b/src/store/map.ts @@ -10,7 +10,7 @@ import { tile2long, } from '../lib/geo'; -export const zoom0 = 10; +export const zoom0 = 18; // Top level properties (the other properties can be derived from them) diff --git a/src/theme/map.css b/src/theme/map.css index 8c5e5e9..b7b714d 100644 --- a/src/theme/map.css +++ b/src/theme/map.css @@ -24,7 +24,7 @@ ion-button.get-location { .track { fill: transparent; - stroke-width: 2px; + stroke-width: 4px; stroke: green; vector-effect: non-scaling-stroke; } \ No newline at end of file