@mapcomponents/react-maplibre 0.1.11 → 0.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/storybook.yml +10 -5
- package/coverage/clover.xml +894 -747
- package/coverage/coverage-final.json +22 -17
- package/coverage/lcov-report/block-navigation.js +8 -0
- package/coverage/lcov-report/index.html +188 -122
- package/coverage/lcov-report/sorter.js +26 -0
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/MapLibreMap.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/MlCreatePdfButton.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/MlFeatureEditor.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/MlFillExtrusionLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/MlFollowGps.js.html +84 -69
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/index.html +27 -21
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/MlGPXViewer.js.html +73 -61
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/gpxConverter.js.html +56 -71
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/index.html +32 -26
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/MlGeoJsonLayer.js.html +162 -48
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/index.html +35 -29
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js.html +311 -0
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/index.html +35 -29
- package/coverage/lcov-report/{components/MlImageMarkerLayer/MlImageMarkerLayer.js.html → src/components/MlLayer/MlLayer.js.html} +123 -126
- package/coverage/lcov-report/src/components/MlLayer/index.html +117 -0
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/MlLayerMagnify.js.html +48 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/MlLayerSwipe.js.html +45 -42
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/index.html +31 -25
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +755 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +380 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +117 -0
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +117 -0
- package/coverage/lcov-report/{components → src/components}/MlMarker/MlMarker.js.html +18 -12
- package/coverage/lcov-report/{components → src/components}/MlMarker/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/MlNavigationCompass.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/MlNavigationTools.js.html +57 -42
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/index.html +25 -19
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/MlOsmLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/MlScaleReference.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/MlShareMapState.js.html +224 -26
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/index.html +25 -19
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/MlThreeJsLayer.js.html +37 -55
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/index.html +31 -25
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/MlUseMapDebugger.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/MlVectorTileLayer.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/index.html +17 -11
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/MlWmsLayer.js.html +20 -14
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/index.html +21 -15
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/MlWmsLoader.js.html +38 -20
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/index.html +23 -17
- package/coverage/lcov-report/src/hooks/index.html +147 -0
- package/coverage/lcov-report/{components/MlLayer/MlLayer.js.html → src/hooks/useMap.js.html} +86 -119
- package/coverage/lcov-report/{hooks → src/hooks}/useMapState.js.html +98 -92
- package/coverage/lcov-report/{hooks → src/hooks}/useWms.js.html +25 -19
- package/coverage/lcov-report/src/i18n.js.html +167 -0
- package/coverage/lcov-report/src/index.html +117 -0
- package/coverage/lcov-report/src/translations/english.js.html +95 -0
- package/coverage/lcov-report/src/translations/german.js.html +95 -0
- package/coverage/lcov-report/src/translations/index.html +132 -0
- package/coverage/lcov.info +1620 -1306
- package/dist/b556faa3bc6829d2.png +0 -0
- package/dist/index.esm.js +976 -688
- package/dist/index.esm.js.map +1 -1
- package/package.json +3 -1
- package/public/assets/dop.png +0 -0
- package/public/assets/historic.png +0 -0
- package/public/assets/osm.png +0 -0
- package/public/thumbnails/MlFollowGps.png +0 -0
- package/public/thumbnails/MlThreeJsLayer.png +0 -0
- package/rollup.config.js +7 -1
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +53 -67
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta.json +1 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.js +49 -46
- package/src/components/MlFollowGps/MlFollowGps.meta.json +2 -2
- package/src/components/MlFollowGps/assets/marker.png +0 -0
- package/src/components/MlGPXViewer/MlGPXViewer.js +45 -43
- package/src/components/MlGPXViewer/gpxConverter.js +22 -29
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.js +45 -9
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -1
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +21 -57
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +6 -7
- package/src/components/MlLayer/MlLayer.js +28 -6
- package/src/components/MlLayer/MlLayer.test.js +12 -10
- package/src/components/MlLayerMagnify/MlLayerMagnify.js +3 -3
- package/src/components/MlLayerSwipe/MlLayerSwipe.js +4 -5
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.css +17 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.doc.de.md +3 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +223 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.meta_.json +15 -0
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.stories.js +106 -0
- package/src/components/MlLayerSwitcher/assets/sample_1.json +26 -0
- package/src/components/MlLayerSwitcher/assets/sample_2.json +22 -0
- package/src/components/MlLayerSwitcher/components/LayerBox.js +98 -0
- package/src/components/MlMarker/MlMarker.js +1 -1
- package/src/components/MlNavigationTools/MlNavigationTools.js +29 -26
- package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -1
- package/src/components/MlScaleReference/MlScaleReference.stories.js +25 -21
- package/src/components/MlShareMapState/MlShareMapState.js +73 -9
- package/src/components/MlShareMapState/MlShareMapState.stories.js +24 -1
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +12 -6
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.js +8 -15
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +3 -3
- package/src/components/MlWmsLayer/MlWmsLayer.js +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.js +8 -4
- package/src/components/MlWmsLoader/MlWmsLoader.meta.json +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +5 -4
- package/src/decorators/EmptyMapContextDecorator.js +11 -6
- package/src/decorators/MapContext3DDecorator.js +25 -20
- package/src/decorators/MapContextDashboardDecorator.js +7 -2
- package/src/decorators/MapContextDecorator.js +7 -3
- package/src/decorators/MapContextKlokantechBasicDecorator.js +8 -4
- package/src/decorators/MultiMapContextDecorator.js +2 -1
- package/src/hooks/useMap.js +36 -62
- package/src/hooks/useMapState.js +3 -3
- package/src/hooks/useWms.js +7 -6
- package/src/i18n.js +28 -0
- package/src/index.js +3 -0
- package/src/translations/english.js +4 -0
- package/src/translations/german.js +4 -0
- package/src/ui_components/ImageLoader.js +73 -0
- package/src/ui_components/Sidebar.js +76 -22
- package/src/ui_components/TopToolbar.js +18 -18
- package/coverage/lcov-report/components/MlLayer/index.html +0 -111
- package/coverage/lcov-report/hooks/index.html +0 -141
- package/coverage/lcov-report/hooks/useMap.js.html +0 -377
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlFollowGps/MlFollowGps.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlFollowGps/MlFollowGps.js</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> / <a href="index.html">src/components/MlFollowGps</a> MlFollowGps.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">65.11% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>28/
|
|
28
|
+
<span class='fraction'>28/43</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">65.85% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>27/
|
|
49
|
+
<span class='fraction'>27/41</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
64
|
<div class='status-line medium'></div>
|
|
59
65
|
<pre><table class="coverage">
|
|
@@ -226,7 +232,12 @@
|
|
|
226
232
|
<a name='L167'></a><a href='#L167'>167</a>
|
|
227
233
|
<a name='L168'></a><a href='#L168'>168</a>
|
|
228
234
|
<a name='L169'></a><a href='#L169'>169</a>
|
|
229
|
-
<a name='L170'></a><a href='#L170'>170</a
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
230
241
|
<span class="cline-any cline-neutral"> </span>
|
|
231
242
|
<span class="cline-any cline-neutral"> </span>
|
|
232
243
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -262,7 +273,6 @@
|
|
|
262
273
|
<span class="cline-any cline-yes">7x</span>
|
|
263
274
|
<span class="cline-any cline-yes">2x</span>
|
|
264
275
|
<span class="cline-any cline-neutral"> </span>
|
|
265
|
-
<span class="cline-any cline-neutral"> </span>
|
|
266
276
|
<span class="cline-any cline-yes">2x</span>
|
|
267
277
|
<span class="cline-any cline-neutral"> </span>
|
|
268
278
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -291,12 +301,12 @@
|
|
|
291
301
|
<span class="cline-any cline-yes">2x</span>
|
|
292
302
|
<span class="cline-any cline-neutral"> </span>
|
|
293
303
|
<span class="cline-any cline-neutral"> </span>
|
|
294
|
-
<span class="cline-any cline-neutral"> </span>
|
|
295
304
|
<span class="cline-any cline-yes">7x</span>
|
|
296
305
|
<span class="cline-any cline-no"> </span>
|
|
297
306
|
<span class="cline-any cline-no"> </span>
|
|
298
307
|
<span class="cline-any cline-no"> </span>
|
|
299
308
|
<span class="cline-any cline-no"> </span>
|
|
309
|
+
<span class="cline-any cline-no"> </span>
|
|
300
310
|
<span class="cline-any cline-neutral"> </span>
|
|
301
311
|
<span class="cline-any cline-neutral"> </span>
|
|
302
312
|
<span class="cline-any cline-yes">7x</span>
|
|
@@ -340,24 +350,25 @@
|
|
|
340
350
|
<span class="cline-any cline-neutral"> </span>
|
|
341
351
|
<span class="cline-any cline-neutral"> </span>
|
|
342
352
|
<span class="cline-any cline-neutral"> </span>
|
|
353
|
+
<span class="cline-any cline-yes">3x</span>
|
|
354
|
+
<span class="cline-any cline-yes">1x</span>
|
|
343
355
|
<span class="cline-any cline-neutral"> </span>
|
|
356
|
+
<span class="cline-any cline-yes">2x</span>
|
|
344
357
|
<span class="cline-any cline-neutral"> </span>
|
|
345
358
|
<span class="cline-any cline-neutral"> </span>
|
|
346
359
|
<span class="cline-any cline-neutral"> </span>
|
|
347
360
|
<span class="cline-any cline-neutral"> </span>
|
|
361
|
+
<span class="cline-any cline-yes">3x</span>
|
|
348
362
|
<span class="cline-any cline-neutral"> </span>
|
|
349
363
|
<span class="cline-any cline-neutral"> </span>
|
|
350
364
|
<span class="cline-any cline-neutral"> </span>
|
|
351
365
|
<span class="cline-any cline-neutral"> </span>
|
|
352
|
-
<span class="cline-any cline-yes">3x</span>
|
|
353
|
-
<span class="cline-any cline-yes">1x</span>
|
|
354
366
|
<span class="cline-any cline-neutral"> </span>
|
|
355
|
-
<span class="cline-any cline-yes">2x</span>
|
|
356
367
|
<span class="cline-any cline-neutral"> </span>
|
|
357
368
|
<span class="cline-any cline-neutral"> </span>
|
|
358
369
|
<span class="cline-any cline-neutral"> </span>
|
|
359
370
|
<span class="cline-any cline-neutral"> </span>
|
|
360
|
-
<span class="cline-any cline-yes">
|
|
371
|
+
<span class="cline-any cline-yes">1x</span>
|
|
361
372
|
<span class="cline-any cline-neutral"> </span>
|
|
362
373
|
<span class="cline-any cline-neutral"> </span>
|
|
363
374
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -367,7 +378,6 @@
|
|
|
367
378
|
<span class="cline-any cline-neutral"> </span>
|
|
368
379
|
<span class="cline-any cline-neutral"> </span>
|
|
369
380
|
<span class="cline-any cline-neutral"> </span>
|
|
370
|
-
<span class="cline-any cline-yes">1x</span>
|
|
371
381
|
<span class="cline-any cline-neutral"> </span>
|
|
372
382
|
<span class="cline-any cline-neutral"> </span>
|
|
373
383
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -378,13 +388,15 @@
|
|
|
378
388
|
<span class="cline-any cline-neutral"> </span>
|
|
379
389
|
<span class="cline-any cline-neutral"> </span>
|
|
380
390
|
<span class="cline-any cline-neutral"> </span>
|
|
391
|
+
<span class="cline-any cline-yes">1x</span>
|
|
392
|
+
<span class="cline-any cline-neutral"> </span>
|
|
393
|
+
<span class="cline-any cline-neutral"> </span>
|
|
381
394
|
<span class="cline-any cline-neutral"> </span>
|
|
382
395
|
<span class="cline-any cline-neutral"> </span>
|
|
383
396
|
<span class="cline-any cline-neutral"> </span>
|
|
384
397
|
<span class="cline-any cline-neutral"> </span>
|
|
385
398
|
<span class="cline-any cline-neutral"> </span>
|
|
386
399
|
<span class="cline-any cline-neutral"> </span>
|
|
387
|
-
<span class="cline-any cline-yes">1x</span>
|
|
388
400
|
<span class="cline-any cline-neutral"> </span>
|
|
389
401
|
<span class="cline-any cline-neutral"> </span>
|
|
390
402
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -402,10 +414,12 @@ import {MapContext} from "@mapcomponents/react-core";
|
|
|
402
414
|
import {v4 as uuidv4} from "uuid";
|
|
403
415
|
import Button from "@mui/material/Button";
|
|
404
416
|
import RoomIcon from "@mui/icons-material/Room";
|
|
405
|
-
import {point} from "@turf/turf"
|
|
417
|
+
import {point, circle} from "@turf/turf"
|
|
406
418
|
import MlGeoJsonLayer from "../MlGeoJsonLayer/MlGeoJsonLayer";
|
|
407
419
|
import MlImageMarkerLayer from "../MlImageMarkerLayer/MlImageMarkerLayer";
|
|
408
420
|
|
|
421
|
+
import marker from "./assets/marker.png";
|
|
422
|
+
|
|
409
423
|
/**
|
|
410
424
|
* Adds a button that makes the map follow the users GPS position using
|
|
411
425
|
* navigator.geolocation.watchPosition if activated
|
|
@@ -426,11 +440,10 @@ const MlFollowGps = (props) => {
|
|
|
426
440
|
const initializedRef = useRef(false);
|
|
427
441
|
const mapRef = useRef(undefined);
|
|
428
442
|
const componentId = useRef((props.idPrefix ? <span class="branch-0 cbranch-no" title="branch not covered" >props.idPrefix </span>: "MlFollowGps-") + uuidv4());
|
|
429
|
-
const [
|
|
443
|
+
const [accuracyGeoJson, setAccuracyGeoJson] = useState();
|
|
430
444
|
|
|
431
445
|
useEffect(() => {
|
|
432
446
|
let _componentId = componentId.current;
|
|
433
|
-
|
|
434
447
|
|
|
435
448
|
return <span class="fstat-no" title="function not covered" >()</span> => {
|
|
436
449
|
// This is the cleanup function, it is called when this react component is removed from react-dom
|
|
@@ -458,14 +471,14 @@ const MlFollowGps = (props) => {
|
|
|
458
471
|
initializedRef.current = true;
|
|
459
472
|
mapRef.current = mapContext.getMap(props.mapId);
|
|
460
473
|
mapRef.current.setCenter([7.132122000552613, 50.716405378037706]);
|
|
461
|
-
|
|
462
474
|
}, [mapContext.mapIds, mapContext, props.mapId]);
|
|
463
475
|
|
|
464
476
|
const getLocationSuccess = <span class="fstat-no" title="function not covered" >(p</span>os) => {
|
|
465
477
|
<span class="cstat-no" title="statement not covered" > if (!mapRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
466
478
|
<span class="cstat-no" title="statement not covered" > mapRef.current.setCenter([pos.coords.longitude, pos.coords.latitude]);</span>
|
|
467
|
-
<span class="cstat-no" title="statement not covered" >
|
|
468
|
-
<span class="cstat-no" title="statement not covered" > setGeoJson(
|
|
479
|
+
const geoJsonPoint = <span class="cstat-no" title="statement not covered" >point([pos.coords.longitude, pos.coords.latitude])</span>
|
|
480
|
+
<span class="cstat-no" title="statement not covered" > setGeoJson(geoJsonPoint);</span>
|
|
481
|
+
<span class="cstat-no" title="statement not covered" > setAccuracyGeoJson(circle(geoJsonPoint, pos.coords.accuracy/1000))</span>
|
|
469
482
|
};
|
|
470
483
|
|
|
471
484
|
const getLocationError = <span class="fstat-no" title="function not covered" >(e</span>rr) => {
|
|
@@ -475,47 +488,38 @@ const MlFollowGps = (props) => {
|
|
|
475
488
|
|
|
476
489
|
return (
|
|
477
490
|
<>
|
|
478
|
-
{isFollowed && geoJson &&
|
|
479
|
-
<span class="branch-2 cbranch-no" title="branch not covered" >
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
],
|
|
490
|
-
],
|
|
491
|
-
base: 2,
|
|
492
|
-
},
|
|
493
|
-
"circle-color": "#ee7700",
|
|
494
|
-
"circle-opacity": 0.5,
|
|
495
|
-
}}
|
|
496
|
-
/>
|
|
497
|
-
}
|
|
491
|
+
{isFollowed && geoJson && (
|
|
492
|
+
<span class="branch-2 cbranch-no" title="branch not covered" > <MlGeoJsonLayer</span>
|
|
493
|
+
geojson={accuracyGeoJson}
|
|
494
|
+
type={"fill"}
|
|
495
|
+
paint={{
|
|
496
|
+
"fill-color": "#ee7700",
|
|
497
|
+
"fill-opacity": 0.5,
|
|
498
|
+
}}
|
|
499
|
+
insertBeforeLayer={"MlFollowGpsMarker"}
|
|
500
|
+
/>
|
|
501
|
+
)}
|
|
498
502
|
|
|
499
|
-
{isFollowed && geoJson &&
|
|
500
|
-
<span class="branch-2 cbranch-no" title="branch not covered" >
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
}
|
|
503
|
+
{isFollowed && geoJson && (
|
|
504
|
+
<span class="branch-2 cbranch-no" title="branch not covered" > <MlImageMarkerLayer</span>
|
|
505
|
+
layerId={"MlFollowGpsMarker"}
|
|
506
|
+
options={{
|
|
507
|
+
type: "symbol",
|
|
508
|
+
source: {
|
|
509
|
+
type: "geojson",
|
|
510
|
+
data: geoJson,
|
|
511
|
+
},
|
|
512
|
+
layout: {
|
|
513
|
+
"icon-size": 0.1,
|
|
514
|
+
"icon-offset": [0, -340],
|
|
515
|
+
},
|
|
516
|
+
}}
|
|
517
|
+
imgSrc={marker}
|
|
518
|
+
/>
|
|
519
|
+
)}
|
|
516
520
|
|
|
517
521
|
<Button
|
|
518
|
-
sx={{zIndex: 1002, color: isFollowed ?
|
|
522
|
+
sx={{ zIndex: 1002, color: isFollowed ? props.onColor : props.offColor, ...props.style }}
|
|
519
523
|
disabled={locationAccessDenied}
|
|
520
524
|
onClick={() => {
|
|
521
525
|
if (isFollowed) {
|
|
@@ -530,7 +534,7 @@ const MlFollowGps = (props) => {
|
|
|
530
534
|
}}
|
|
531
535
|
>
|
|
532
536
|
{" "}
|
|
533
|
-
<RoomIcon sx={{}}/>{" "}
|
|
537
|
+
<RoomIcon sx={{ fontSize: props.style.fontSize }} />{" "}
|
|
534
538
|
</Button>
|
|
535
539
|
</>
|
|
536
540
|
);
|
|
@@ -546,11 +550,14 @@ MlFollowGps.defaultProps = {
|
|
|
546
550
|
backgroundColor: "#414141",
|
|
547
551
|
borderRadius: "23%",
|
|
548
552
|
margin: 0.15,
|
|
553
|
+
fontSize: "1.3em",
|
|
549
554
|
":hover": {
|
|
550
555
|
backgroundColor: "#515151",
|
|
551
556
|
color: "#ececec",
|
|
552
557
|
},
|
|
553
558
|
},
|
|
559
|
+
onColor: "#ececec",
|
|
560
|
+
offColor: "#666"
|
|
554
561
|
};
|
|
555
562
|
|
|
556
563
|
MlFollowGps.propTypes = {
|
|
@@ -562,6 +569,14 @@ MlFollowGps.propTypes = {
|
|
|
562
569
|
* CSS style object that is applied to the button component
|
|
563
570
|
*/
|
|
564
571
|
style: PropTypes.object,
|
|
572
|
+
/**
|
|
573
|
+
* Active button font color
|
|
574
|
+
*/
|
|
575
|
+
onColor: PropTypes.string,
|
|
576
|
+
/**
|
|
577
|
+
* Inactive button font color
|
|
578
|
+
*/
|
|
579
|
+
offColor: PropTypes.string,
|
|
565
580
|
};
|
|
566
581
|
export default MlFollowGps;
|
|
567
582
|
</pre></td></tr></table></pre>
|
|
@@ -570,18 +585,18 @@ export default MlFollowGps;
|
|
|
570
585
|
</div><!-- /wrapper -->
|
|
571
586
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
572
587
|
Code coverage generated by
|
|
573
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
574
|
-
at
|
|
588
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
589
|
+
at Tue Dec 21 2021 11:51:22 GMT+0000 (Coordinated Universal Time)
|
|
575
590
|
</div>
|
|
576
591
|
</div>
|
|
577
|
-
<script src="
|
|
592
|
+
<script src="../../../prettify.js"></script>
|
|
578
593
|
<script>
|
|
579
594
|
window.onload = function () {
|
|
580
595
|
prettyPrint();
|
|
581
596
|
};
|
|
582
597
|
</script>
|
|
583
|
-
<script src="
|
|
584
|
-
<script src="
|
|
598
|
+
<script src="../../../sorter.js"></script>
|
|
599
|
+
<script src="../../../block-navigation.js"></script>
|
|
585
600
|
</body>
|
|
586
601
|
</html>
|
|
587
602
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlFollowGps</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlFollowGps</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
|
-
<link rel="stylesheet" href="
|
|
9
|
-
<link rel="stylesheet" href="
|
|
10
|
-
<link rel="shortcut icon" type="image/x-icon" href="
|
|
8
|
+
<link rel="stylesheet" href="../../../prettify.css" />
|
|
9
|
+
<link rel="stylesheet" href="../../../base.css" />
|
|
10
|
+
<link rel="shortcut icon" type="image/x-icon" href="../../../favicon.png" />
|
|
11
11
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
12
12
|
<style type='text/css'>
|
|
13
13
|
.coverage-summary .sorter {
|
|
14
|
-
background-image: url(
|
|
14
|
+
background-image: url(../../../sort-arrow-sprite.png);
|
|
15
15
|
}
|
|
16
16
|
</style>
|
|
17
17
|
</head>
|
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="
|
|
22
|
+
<h1><a href="../../../index.html">All files</a> src/components/MlFollowGps</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">65.11% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>28/
|
|
28
|
+
<span class='fraction'>28/43</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">65.85% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>27/
|
|
49
|
+
<span class='fraction'>27/41</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -54,6 +54,12 @@
|
|
|
54
54
|
<p class="quiet">
|
|
55
55
|
Press <em>n</em> or <em>j</em> to go to the next uncovered block, <em>b</em>, <em>p</em> or <em>k</em> for the previous block.
|
|
56
56
|
</p>
|
|
57
|
+
<template id="filterTemplate">
|
|
58
|
+
<div class="quiet">
|
|
59
|
+
Filter:
|
|
60
|
+
<input oninput="onInput()" type="search" id="fileSearch">
|
|
61
|
+
</div>
|
|
62
|
+
</template>
|
|
57
63
|
</div>
|
|
58
64
|
<div class='status-line medium'></div>
|
|
59
65
|
<div class="pad1">
|
|
@@ -74,17 +80,17 @@
|
|
|
74
80
|
</thead>
|
|
75
81
|
<tbody><tr>
|
|
76
82
|
<td class="file medium" data-value="MlFollowGps.js"><a href="MlFollowGps.js.html">MlFollowGps.js</a></td>
|
|
77
|
-
<td data-value="
|
|
78
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
83
|
+
<td data-value="65.11" class="pic medium">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 65%"></div><div class="cover-empty" style="width: 35%"></div></div>
|
|
79
85
|
</td>
|
|
80
|
-
<td data-value="
|
|
81
|
-
<td data-value="
|
|
86
|
+
<td data-value="65.11" class="pct medium">65.11%</td>
|
|
87
|
+
<td data-value="43" class="abs medium">28/43</td>
|
|
82
88
|
<td data-value="59.09" class="pct medium">59.09%</td>
|
|
83
89
|
<td data-value="22" class="abs medium">13/22</td>
|
|
84
90
|
<td data-value="57.14" class="pct medium">57.14%</td>
|
|
85
91
|
<td data-value="7" class="abs medium">4/7</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="
|
|
92
|
+
<td data-value="65.85" class="pct medium">65.85%</td>
|
|
93
|
+
<td data-value="41" class="abs medium">27/41</td>
|
|
88
94
|
</tr>
|
|
89
95
|
|
|
90
96
|
</tbody>
|
|
@@ -94,18 +100,18 @@
|
|
|
94
100
|
</div><!-- /wrapper -->
|
|
95
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
96
102
|
Code coverage generated by
|
|
97
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
98
|
-
at
|
|
103
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
+
at Tue Dec 21 2021 11:51:22 GMT+0000 (Coordinated Universal Time)
|
|
99
105
|
</div>
|
|
100
106
|
</div>
|
|
101
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
102
108
|
<script>
|
|
103
109
|
window.onload = function () {
|
|
104
110
|
prettyPrint();
|
|
105
111
|
};
|
|
106
112
|
</script>
|
|
107
|
-
<script src="
|
|
108
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
109
115
|
</body>
|
|
110
116
|
</html>
|
|
111
117
|
|