@mapcomponents/react-maplibre 0.1.10 → 0.1.14
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/ISSUE_TEMPLATE/bug_report.md +2 -2
- package/.github/ISSUE_TEMPLATE/feature_request.md +3 -3
- package/.github/workflows/node_version_test.yml +25 -0
- package/.github/workflows/storybook.yml +6 -3
- package/CONTRIBUTING.md +2 -2
- package/README.md +3 -7
- package/coverage/clover.xml +748 -625
- package/coverage/coverage-final.json +19 -14
- package/coverage/lcov-report/block-navigation.js +8 -0
- package/coverage/lcov-report/index.html +170 -104
- 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 +99 -48
- 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 +91 -31
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/index.html +35 -29
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/MlImageMarkerLayer.js.html +26 -23
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/index.html +26 -20
- package/coverage/lcov-report/{components → src/components}/MlLayer/MlLayer.js.html +37 -31
- package/coverage/lcov-report/{components → src/components}/MlLayer/index.html +33 -27
- 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 +55 -37
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/index.html +23 -17
- 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 +17 -11
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/index.html +17 -11
- 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/{hooks → src/hooks}/index.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMap.js.html +17 -11
- package/coverage/lcov-report/{hooks → src/hooks}/useMapState.js.html +17 -11
- 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 +1278 -1010
- package/dist/b556faa3bc6829d2.png +0 -0
- package/dist/index.esm.js +276 -90
- 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 +58 -73
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta.json +1 -1
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.js +46 -31
- 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 +27 -9
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -1
- package/src/components/MlGeoJsonLayer/util/transitionFunctions.js +19 -12
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +3 -4
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +6 -7
- package/src/components/MlLayer/MlLayer.js +2 -2
- 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 +26 -22
- package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -1
- package/src/components/MlScaleReference/MlScaleReference.stories.js +25 -21
- 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 -7
- package/src/decorators/MapContextDecorator.js +7 -8
- package/src/decorators/MapContextKlokantechBasicDecorator.js +8 -9
- package/src/decorators/MultiMapContextDecorator.js +2 -6
- package/src/hooks/useMapState.stories.js +7 -2
- package/src/hooks/useWms.js +7 -6
- package/src/i18n.js +28 -0
- package/src/index.js +1 -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
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlMarker/MlMarker.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlMarker/MlMarker.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,7 +19,7 @@
|
|
|
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/MlMarker</a> MlMarker.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -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 low'></div>
|
|
59
65
|
<pre><table class="coverage">
|
|
@@ -486,7 +492,7 @@ const MlMarker = <span class="cstat-no" title="statement not covered" ><span cla
|
|
|
486
492
|
"&:hover": {
|
|
487
493
|
opacity: 1,
|
|
488
494
|
},
|
|
489
|
-
zIndex:
|
|
495
|
+
zIndex: -1,
|
|
490
496
|
}}
|
|
491
497
|
>
|
|
492
498
|
<iframe
|
|
@@ -531,18 +537,18 @@ export default MlMarker;
|
|
|
531
537
|
</div><!-- /wrapper -->
|
|
532
538
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
533
539
|
Code coverage generated by
|
|
534
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
535
|
-
at
|
|
540
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
541
|
+
at Wed Dec 15 2021 17:41:09 GMT+0000 (Coordinated Universal Time)
|
|
536
542
|
</div>
|
|
537
543
|
</div>
|
|
538
|
-
<script src="
|
|
544
|
+
<script src="../../../prettify.js"></script>
|
|
539
545
|
<script>
|
|
540
546
|
window.onload = function () {
|
|
541
547
|
prettyPrint();
|
|
542
548
|
};
|
|
543
549
|
</script>
|
|
544
|
-
<script src="
|
|
545
|
-
<script src="
|
|
550
|
+
<script src="../../../sorter.js"></script>
|
|
551
|
+
<script src="../../../block-navigation.js"></script>
|
|
546
552
|
</body>
|
|
547
553
|
</html>
|
|
548
554
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlMarker</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlMarker</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,7 +19,7 @@
|
|
|
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/MlMarker</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -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 low'></div>
|
|
59
65
|
<div class="pad1">
|
|
@@ -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 Wed Dec 15 2021 17:41:09 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
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlNavigationCompass/MlNavigationCompass.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlNavigationCompass/MlNavigationCompass.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,7 +19,7 @@
|
|
|
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/MlNavigationCompass</a> MlNavigationCompass.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -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">
|
|
@@ -756,18 +762,18 @@ export default MlNavigationCompass;
|
|
|
756
762
|
</div><!-- /wrapper -->
|
|
757
763
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
758
764
|
Code coverage generated by
|
|
759
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
760
|
-
at
|
|
765
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
766
|
+
at Wed Dec 15 2021 17:41:09 GMT+0000 (Coordinated Universal Time)
|
|
761
767
|
</div>
|
|
762
768
|
</div>
|
|
763
|
-
<script src="
|
|
769
|
+
<script src="../../../prettify.js"></script>
|
|
764
770
|
<script>
|
|
765
771
|
window.onload = function () {
|
|
766
772
|
prettyPrint();
|
|
767
773
|
};
|
|
768
774
|
</script>
|
|
769
|
-
<script src="
|
|
770
|
-
<script src="
|
|
775
|
+
<script src="../../../sorter.js"></script>
|
|
776
|
+
<script src="../../../block-navigation.js"></script>
|
|
771
777
|
</body>
|
|
772
778
|
</html>
|
|
773
779
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlNavigationCompass</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlNavigationCompass</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,7 +19,7 @@
|
|
|
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/MlNavigationCompass</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -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">
|
|
@@ -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 Wed Dec 15 2021 17:41:09 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
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlNavigationTools/MlNavigationTools.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlNavigationTools/MlNavigationTools.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,20 +19,20 @@
|
|
|
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/MlNavigationTools</a> MlNavigationTools.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/49</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/44</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/45</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 low'></div>
|
|
59
65
|
<pre><table class="coverage">
|
|
@@ -221,7 +227,12 @@
|
|
|
221
227
|
<a name='L162'></a><a href='#L162'>162</a>
|
|
222
228
|
<a name='L163'></a><a href='#L163'>163</a>
|
|
223
229
|
<a name='L164'></a><a href='#L164'>164</a>
|
|
224
|
-
<a name='L165'></a><a href='#L165'>165</a
|
|
230
|
+
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
+
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
+
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
|
225
236
|
<span class="cline-any cline-neutral"> </span>
|
|
226
237
|
<span class="cline-any cline-neutral"> </span>
|
|
227
238
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -246,6 +257,8 @@
|
|
|
246
257
|
<span class="cline-any cline-no"> </span>
|
|
247
258
|
<span class="cline-any cline-no"> </span>
|
|
248
259
|
<span class="cline-any cline-no"> </span>
|
|
260
|
+
<span class="cline-any cline-no"> </span>
|
|
261
|
+
<span class="cline-any cline-neutral"> </span>
|
|
249
262
|
<span class="cline-any cline-neutral"> </span>
|
|
250
263
|
<span class="cline-any cline-neutral"> </span>
|
|
251
264
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -385,10 +398,11 @@
|
|
|
385
398
|
<span class="cline-any cline-neutral"> </span>
|
|
386
399
|
<span class="cline-any cline-neutral"> </span>
|
|
387
400
|
<span class="cline-any cline-neutral"> </span>
|
|
401
|
+
<span class="cline-any cline-neutral"> </span>
|
|
388
402
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React from "react";
|
|
389
403
|
|
|
390
|
-
import {
|
|
391
|
-
import {
|
|
404
|
+
import {MapContext} from "@mapcomponents/react-core";
|
|
405
|
+
import {useEffect, useRef, useContext, useState} from "react";
|
|
392
406
|
import Button from "@mui/material/Button";
|
|
393
407
|
import ButtonGroup from "@mui/material/ButtonGroup";
|
|
394
408
|
import ControlPointIcon from "@mui/icons-material/ControlPoint";
|
|
@@ -396,10 +410,11 @@ import RemoveCircleOutlineIcon from "@mui/icons-material/RemoveCircleOutline";
|
|
|
396
410
|
//import ZoomOutIcon from "@mui/icons-material/ZoomOut";
|
|
397
411
|
//import ZoomInIcon from "@mui/icons-material/ZoomIn";
|
|
398
412
|
import GpsFixedIcon from "@mui/icons-material/GpsFixed";
|
|
399
|
-
import {
|
|
413
|
+
import {v4 as uuidv4} from "uuid";
|
|
400
414
|
|
|
401
415
|
import MlNavigationCompass from "../MlNavigationCompass/MlNavigationCompass";
|
|
402
416
|
import MlFollowGps from "../MlFollowGps/MlFollowGps";
|
|
417
|
+
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
403
418
|
|
|
404
419
|
const MlNavigationTools = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >(p</span>rops) => {</span>
|
|
405
420
|
const mapContext = <span class="cstat-no" title="statement not covered" >useContext(MapContext);</span>
|
|
@@ -409,17 +424,19 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
409
424
|
|
|
410
425
|
const [pitch, setPitch] = <span class="cstat-no" title="statement not covered" >useState(0);</span>
|
|
411
426
|
const [locationAccessDenied, setLocationAccessDenied] = <span class="cstat-no" title="statement not covered" >useState(false);</span>
|
|
427
|
+
const mediaIsMobile = <span class="cstat-no" title="statement not covered" >useMediaQuery("(max-width:900px)");</span>
|
|
412
428
|
const buttonStyle = <span class="cstat-no" title="statement not covered" >{</span>
|
|
413
|
-
minWidth: "
|
|
414
|
-
minHeight: "
|
|
415
|
-
width: "30px",
|
|
416
|
-
height: "30px",
|
|
429
|
+
minWidth: "20px",
|
|
430
|
+
minHeight: "20px",
|
|
431
|
+
width: mediaIsMobile ? "50px" : "30px",
|
|
432
|
+
height: mediaIsMobile ? "50px" : "30px",
|
|
417
433
|
color: "#bbb",
|
|
418
434
|
backgroundColor: "#414141",
|
|
419
435
|
borderRadius: "23%",
|
|
420
436
|
//border: "1px solid #bbb",
|
|
421
437
|
//boxShadow: "0px 0px 4px rgba(0,0,0,.5)",
|
|
422
438
|
margin: 0.15,
|
|
439
|
+
fontSize: mediaIsMobile ? "1.5em" : "1.2em",
|
|
423
440
|
":hover": {
|
|
424
441
|
backgroundColor: "#515151",
|
|
425
442
|
color: "#ececec",
|
|
@@ -464,7 +481,7 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
464
481
|
<span class="cstat-no" title="statement not covered" > if (!mapRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
465
482
|
|
|
466
483
|
<span class="cstat-no" title="statement not covered" > if (mapRef.current.transform._zoom + 0.5 <= mapRef.current.transform._maxZoom) {</span>
|
|
467
|
-
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({
|
|
484
|
+
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({zoom: mapRef.current.transform._zoom + 0.5});</span>
|
|
468
485
|
}
|
|
469
486
|
};
|
|
470
487
|
|
|
@@ -472,7 +489,7 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
472
489
|
<span class="cstat-no" title="statement not covered" > if (!mapRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
473
490
|
|
|
474
491
|
<span class="cstat-no" title="statement not covered" > if (mapRef.current.transform._zoom - 0.5 >= mapRef.current.transform._minZoom) {</span>
|
|
475
|
-
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({
|
|
492
|
+
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({zoom: mapRef.current.transform._zoom - 0.5});</span>
|
|
476
493
|
}
|
|
477
494
|
};
|
|
478
495
|
|
|
@@ -483,7 +500,7 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
483
500
|
<span class="cstat-no" title="statement not covered" > if (mapRef.current.getPitch() !== 0) {</span>
|
|
484
501
|
<span class="cstat-no" title="statement not covered" > targetPitch = 0;</span>
|
|
485
502
|
}
|
|
486
|
-
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({
|
|
503
|
+
<span class="cstat-no" title="statement not covered" > mapRef.current.easeTo({pitch: targetPitch});</span>
|
|
487
504
|
};
|
|
488
505
|
|
|
489
506
|
const moveToCurrentLocation = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
@@ -504,8 +521,8 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
504
521
|
style={{
|
|
505
522
|
zIndex: 501,
|
|
506
523
|
position: "absolute",
|
|
507
|
-
right: "
|
|
508
|
-
bottom: "20px",
|
|
524
|
+
right: mediaIsMobile ? "15px" : "5px",
|
|
525
|
+
bottom: mediaIsMobile ? "40px" : "20px",
|
|
509
526
|
display: "flex",
|
|
510
527
|
flexDirection: "column",
|
|
511
528
|
}}
|
|
@@ -514,34 +531,35 @@ const MlNavigationTools = <span class="cstat-no" title="statement not covered" >
|
|
|
514
531
|
style={{
|
|
515
532
|
width: "31px",
|
|
516
533
|
position: "relative",
|
|
517
|
-
height: "
|
|
518
|
-
marginLeft: "-5px",
|
|
534
|
+
height: mediaIsMobile ? "55px" : "45px",
|
|
535
|
+
marginLeft: mediaIsMobile ? "3px" : "-5px",
|
|
536
|
+
transform: mediaIsMobile ? "scale(1.6)" : "scale(1)"
|
|
519
537
|
}}
|
|
520
538
|
backgroundStyle={{
|
|
521
539
|
boxShadow: "0px 0px 18px rgba(0,0,0,.5)",
|
|
522
540
|
}}
|
|
523
541
|
/>
|
|
524
|
-
<Button sx={{
|
|
542
|
+
<Button sx={{...buttonStyle, fontWeight: 600}} onClick={adjustPitch}>
|
|
525
543
|
{pitch ? "2D" : "3D"}
|
|
526
544
|
</Button>
|
|
527
545
|
<Button sx={buttonStyle} onClick={moveToCurrentLocation} disabled={locationAccessDenied}>
|
|
528
|
-
<GpsFixedIcon sx={{
|
|
546
|
+
<GpsFixedIcon sx={{fontSize: mediaIsMobile ? "1.5em" : "1.2em"}}/>
|
|
529
547
|
</Button>
|
|
530
|
-
<MlFollowGps />
|
|
548
|
+
<MlFollowGps style={buttonStyle}/>
|
|
531
549
|
<ButtonGroup
|
|
532
550
|
orientation="vertical"
|
|
533
551
|
sx={{
|
|
534
|
-
width: "
|
|
552
|
+
width: "50px",
|
|
535
553
|
border: "none",
|
|
536
|
-
Button: {
|
|
537
|
-
"Button:hover": {
|
|
554
|
+
Button: {minWidth: "20px !important", border: "none", padding: 0},
|
|
555
|
+
"Button:hover": {border: "none"},
|
|
538
556
|
}}
|
|
539
557
|
>
|
|
540
558
|
<Button sx={buttonStyle} onClick={zoomIn}>
|
|
541
|
-
<ControlPointIcon />
|
|
559
|
+
<ControlPointIcon sx={{fontSize: mediaIsMobile ? "1.5em" : "1.2em"}}/>
|
|
542
560
|
</Button>
|
|
543
561
|
<Button sx={buttonStyle} onClick={zoomOut}>
|
|
544
|
-
<RemoveCircleOutlineIcon />
|
|
562
|
+
<RemoveCircleOutlineIcon sx={{fontSize: mediaIsMobile ? "1.5em" : "1.2em"}}/>
|
|
545
563
|
</Button>
|
|
546
564
|
</ButtonGroup>
|
|
547
565
|
</div>
|
|
@@ -555,18 +573,18 @@ export default MlNavigationTools;
|
|
|
555
573
|
</div><!-- /wrapper -->
|
|
556
574
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
557
575
|
Code coverage generated by
|
|
558
|
-
<a href="https://istanbul.js.org/" target="_blank">istanbul</a>
|
|
559
|
-
at
|
|
576
|
+
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
577
|
+
at Wed Dec 15 2021 17:41:09 GMT+0000 (Coordinated Universal Time)
|
|
560
578
|
</div>
|
|
561
579
|
</div>
|
|
562
|
-
<script src="
|
|
580
|
+
<script src="../../../prettify.js"></script>
|
|
563
581
|
<script>
|
|
564
582
|
window.onload = function () {
|
|
565
583
|
prettyPrint();
|
|
566
584
|
};
|
|
567
585
|
</script>
|
|
568
|
-
<script src="
|
|
569
|
-
<script src="
|
|
586
|
+
<script src="../../../sorter.js"></script>
|
|
587
|
+
<script src="../../../block-navigation.js"></script>
|
|
570
588
|
</body>
|
|
571
589
|
</html>
|
|
572
590
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlNavigationTools</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlNavigationTools</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,20 +19,20 @@
|
|
|
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/MlNavigationTools</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/49</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/44</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/45</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 low'></div>
|
|
59
65
|
<div class="pad1">
|
|
@@ -78,13 +84,13 @@
|
|
|
78
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
79
85
|
</td>
|
|
80
86
|
<td data-value="0" class="pct low">0%</td>
|
|
81
|
-
<td data-value="
|
|
87
|
+
<td data-value="49" class="abs low">0/49</td>
|
|
82
88
|
<td data-value="0" class="pct low">0%</td>
|
|
83
|
-
<td data-value="
|
|
89
|
+
<td data-value="44" class="abs low">0/44</td>
|
|
84
90
|
<td data-value="0" class="pct low">0%</td>
|
|
85
91
|
<td data-value="11" class="abs low">0/11</td>
|
|
86
92
|
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="
|
|
93
|
+
<td data-value="45" class="abs low">0/45</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 Wed Dec 15 2021 17:41:09 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
|
|