@mapcomponents/react-maplibre 0.1.12 → 0.1.16
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 +4 -2
- package/CHANGELOG.md +33 -0
- package/README.md +22 -6
- package/coverage/clover.xml +893 -760
- package/coverage/coverage-final.json +22 -17
- package/coverage/lcov-report/index.html +183 -123
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/MapLibreMap.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MapLibreMap/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/MlCreatePdfButton.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlCreatePdfButton/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/MlFeatureEditor.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlFeatureEditor/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/MlFillExtrusionLayer.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlFillExtrusionLayer/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/MlFollowGps.js.html +148 -136
- package/coverage/lcov-report/{components → src/components}/MlFollowGps/index.html +24 -24
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/MlGPXViewer.js.html +66 -60
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/gpxConverter.js.html +49 -70
- package/coverage/lcov-report/{components → src/components}/MlGPXViewer/index.html +25 -25
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/MlGeoJsonLayer.js.html +155 -47
- package/coverage/lcov-report/{components → src/components}/MlGeoJsonLayer/index.html +28 -28
- package/coverage/lcov-report/{components/MlLayer/MlLayer.js.html → src/components/MlImageMarkerLayer/MlImageMarkerLayer.js.html} +88 -121
- package/coverage/lcov-report/{components → src/components}/MlImageMarkerLayer/index.html +28 -28
- package/coverage/lcov-report/{components/MlImageMarkerLayer/MlImageMarkerLayer.js.html → src/components/MlLayer/MlLayer.js.html} +116 -125
- package/coverage/lcov-report/src/components/MlLayer/index.html +117 -0
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/MlLayerMagnify.js.html +41 -41
- package/coverage/lcov-report/{components → src/components}/MlLayerMagnify/index.html +24 -24
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/MlLayerSwipe.js.html +38 -41
- package/coverage/lcov-report/{components → src/components}/MlLayerSwipe/index.html +24 -24
- 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 +11 -11
- package/coverage/lcov-report/{components → src/components}/MlMarker/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/MlNavigationCompass.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlNavigationCompass/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/MlNavigationTools.js.html +50 -41
- package/coverage/lcov-report/{components → src/components}/MlNavigationTools/index.html +18 -18
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/MlOsmLayer.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlOsmLayer/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/MlScaleReference.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlScaleReference/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/MlShareMapState.js.html +217 -25
- package/coverage/lcov-report/{components → src/components}/MlShareMapState/index.html +18 -18
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlSpatialElevationProfile/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/MlThreeJsLayer.js.html +30 -54
- package/coverage/lcov-report/{components → src/components}/MlThreeJsLayer/index.html +24 -24
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/MlUseMapDebugger.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlUseMapDebugger/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/MlVectorTileLayer.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlVectorTileLayer/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlWmsFeatureInfoPopup/index.html +10 -10
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/MlWmsLayer.js.html +13 -13
- package/coverage/lcov-report/{components → src/components}/MlWmsLayer/index.html +14 -14
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/MlWmsLoader.js.html +31 -19
- package/coverage/lcov-report/{components → src/components}/MlWmsLoader/index.html +16 -16
- package/coverage/lcov-report/src/hooks/index.html +147 -0
- package/coverage/lcov-report/src/hooks/useMap.js.html +296 -0
- package/coverage/lcov-report/{hooks → src/hooks}/useMapState.js.html +91 -91
- package/coverage/lcov-report/{hooks → src/hooks}/useWms.js.html +18 -18
- 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 +1610 -1314
- package/dist/b556faa3bc6829d2.png +0 -0
- package/dist/index.esm.js +934 -668
- 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/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +53 -67
- package/src/components/MlComponentTemplate/MlComponentTemplate.js +6 -31
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.js +92 -88
- package/src/components/MlFollowGps/MlFollowGps.meta.json +2 -2
- package/src/components/MlFollowGps/MlFollowGps.test.js +3 -5
- 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/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/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 +33 -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 +75 -20
- package/src/ui_components/TopToolbar.js +18 -18
- package/coverage/lcov-report/components/MlLayer/index.html +0 -117
- package/coverage/lcov-report/hooks/index.html +0 -147
- package/coverage/lcov-report/hooks/useMap.js.html +0 -383
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlVectorTileLayer/MlVectorTileLayer.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlVectorTileLayer/MlVectorTileLayer.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/MlVectorTileLayer</a> MlVectorTileLayer.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -469,17 +469,17 @@ export default MlVectorTileLayer;
|
|
|
469
469
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
470
470
|
Code coverage generated by
|
|
471
471
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
472
|
-
at
|
|
472
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
473
473
|
</div>
|
|
474
474
|
</div>
|
|
475
|
-
<script src="
|
|
475
|
+
<script src="../../../prettify.js"></script>
|
|
476
476
|
<script>
|
|
477
477
|
window.onload = function () {
|
|
478
478
|
prettyPrint();
|
|
479
479
|
};
|
|
480
480
|
</script>
|
|
481
|
-
<script src="
|
|
482
|
-
<script src="
|
|
481
|
+
<script src="../../../sorter.js"></script>
|
|
482
|
+
<script src="../../../block-navigation.js"></script>
|
|
483
483
|
</body>
|
|
484
484
|
</html>
|
|
485
485
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlVectorTileLayer</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlVectorTileLayer</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/MlVectorTileLayer</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
108
108
|
<script>
|
|
109
109
|
window.onload = function () {
|
|
110
110
|
prettyPrint();
|
|
111
111
|
};
|
|
112
112
|
</script>
|
|
113
|
-
<script src="
|
|
114
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
115
115
|
</body>
|
|
116
116
|
</html>
|
|
117
117
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.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/MlWmsFeatureInfoPopup</a> MlWmsFeatureInfoPopup.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -262,17 +262,17 @@ export default MlWmsFeatureInfoPopup;
|
|
|
262
262
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
263
263
|
Code coverage generated by
|
|
264
264
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
265
|
-
at
|
|
265
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
266
266
|
</div>
|
|
267
267
|
</div>
|
|
268
|
-
<script src="
|
|
268
|
+
<script src="../../../prettify.js"></script>
|
|
269
269
|
<script>
|
|
270
270
|
window.onload = function () {
|
|
271
271
|
prettyPrint();
|
|
272
272
|
};
|
|
273
273
|
</script>
|
|
274
|
-
<script src="
|
|
275
|
-
<script src="
|
|
274
|
+
<script src="../../../sorter.js"></script>
|
|
275
|
+
<script src="../../../block-navigation.js"></script>
|
|
276
276
|
</body>
|
|
277
277
|
</html>
|
|
278
278
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsFeatureInfoPopup</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsFeatureInfoPopup</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/MlWmsFeatureInfoPopup</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
108
108
|
<script>
|
|
109
109
|
window.onload = function () {
|
|
110
110
|
prettyPrint();
|
|
111
111
|
};
|
|
112
112
|
</script>
|
|
113
|
-
<script src="
|
|
114
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
115
115
|
</body>
|
|
116
116
|
</html>
|
|
117
117
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsLayer/MlWmsLayer.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsLayer/MlWmsLayer.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/MlWmsLayer</a> MlWmsLayer.js</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">63.63% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>14/22</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -480,7 +480,7 @@ const defaultProps = {
|
|
|
480
480
|
const MlWmsLayer = (props) => {
|
|
481
481
|
const mapContext = useContext(MapContext);
|
|
482
482
|
|
|
483
|
-
const componentId = useRef(
|
|
483
|
+
const componentId = useRef(props.layerId || ("MlWmsLayer-" + uuidv4()));
|
|
484
484
|
const mapRef = useRef(null);
|
|
485
485
|
const initializedRef = useRef(false);
|
|
486
486
|
const layerId = useRef(props.layerId || componentId.current);
|
|
@@ -622,17 +622,17 @@ export default MlWmsLayer;
|
|
|
622
622
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
623
623
|
Code coverage generated by
|
|
624
624
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
625
|
-
at
|
|
625
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
626
626
|
</div>
|
|
627
627
|
</div>
|
|
628
|
-
<script src="
|
|
628
|
+
<script src="../../../prettify.js"></script>
|
|
629
629
|
<script>
|
|
630
630
|
window.onload = function () {
|
|
631
631
|
prettyPrint();
|
|
632
632
|
};
|
|
633
633
|
</script>
|
|
634
|
-
<script src="
|
|
635
|
-
<script src="
|
|
634
|
+
<script src="../../../sorter.js"></script>
|
|
635
|
+
<script src="../../../block-navigation.js"></script>
|
|
636
636
|
</body>
|
|
637
637
|
</html>
|
|
638
638
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsLayer</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsLayer</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/MlWmsLayer</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">63.63% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>14/22</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="83.33" class="pct high">83.33%</td>
|
|
87
87
|
<td data-value="42" class="abs high">35/42</td>
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="22" class="abs medium">
|
|
88
|
+
<td data-value="63.63" class="pct medium">63.63%</td>
|
|
89
|
+
<td data-value="22" class="abs medium">14/22</td>
|
|
90
90
|
<td data-value="100" class="pct high">100%</td>
|
|
91
91
|
<td data-value="5" class="abs high">5/5</td>
|
|
92
92
|
<td data-value="84.61" class="pct high">84.61%</td>
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
108
108
|
<script>
|
|
109
109
|
window.onload = function () {
|
|
110
110
|
prettyPrint();
|
|
111
111
|
};
|
|
112
112
|
</script>
|
|
113
|
-
<script src="
|
|
114
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
115
115
|
</body>
|
|
116
116
|
</html>
|
|
117
117
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsLoader/MlWmsLoader.js</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsLoader/MlWmsLoader.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/MlWmsLoader</a> MlWmsLoader.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/96</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/55</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/92</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -361,7 +361,11 @@
|
|
|
361
361
|
<a name='L296'></a><a href='#L296'>296</a>
|
|
362
362
|
<a name='L297'></a><a href='#L297'>297</a>
|
|
363
363
|
<a name='L298'></a><a href='#L298'>298</a>
|
|
364
|
-
<a name='L299'></a><a href='#L299'>299</a
|
|
364
|
+
<a name='L299'></a><a href='#L299'>299</a>
|
|
365
|
+
<a name='L300'></a><a href='#L300'>300</a>
|
|
366
|
+
<a name='L301'></a><a href='#L301'>301</a>
|
|
367
|
+
<a name='L302'></a><a href='#L302'>302</a>
|
|
368
|
+
<a name='L303'></a><a href='#L303'>303</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
365
369
|
<span class="cline-any cline-neutral"> </span>
|
|
366
370
|
<span class="cline-any cline-neutral"> </span>
|
|
367
371
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -437,6 +441,8 @@
|
|
|
437
441
|
<span class="cline-any cline-no"> </span>
|
|
438
442
|
<span class="cline-any cline-no"> </span>
|
|
439
443
|
<span class="cline-any cline-neutral"> </span>
|
|
444
|
+
<span class="cline-any cline-no"> </span>
|
|
445
|
+
<span class="cline-any cline-neutral"> </span>
|
|
440
446
|
<span class="cline-any cline-neutral"> </span>
|
|
441
447
|
<span class="cline-any cline-no"> </span>
|
|
442
448
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -562,6 +568,8 @@
|
|
|
562
568
|
<span class="cline-any cline-neutral"> </span>
|
|
563
569
|
<span class="cline-any cline-no"> </span>
|
|
564
570
|
<span class="cline-any cline-no"> </span>
|
|
571
|
+
<span class="cline-any cline-no"> </span>
|
|
572
|
+
<span class="cline-any cline-no"> </span>
|
|
565
573
|
<span class="cline-any cline-neutral"> </span>
|
|
566
574
|
<span class="cline-any cline-neutral"> </span>
|
|
567
575
|
<span class="cline-any cline-no"> </span>
|
|
@@ -569,8 +577,8 @@
|
|
|
569
577
|
<span class="cline-any cline-neutral"> </span>
|
|
570
578
|
<span class="cline-any cline-neutral"> </span>
|
|
571
579
|
<span class="cline-any cline-neutral"> </span>
|
|
572
|
-
<span class="cline-any cline-no"> </span>
|
|
573
580
|
<span class="cline-any cline-neutral"> </span>
|
|
581
|
+
<span class="cline-any cline-no"> </span>
|
|
574
582
|
<span class="cline-any cline-neutral"> </span>
|
|
575
583
|
<span class="cline-any cline-neutral"> </span>
|
|
576
584
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -702,7 +710,7 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
702
710
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
703
711
|
const mapContext = <span class="cstat-no" title="statement not covered" >useContext(MapContext);</span>
|
|
704
712
|
const { capabilities, error, setUrl, getFeatureInfoUrl, wmsUrl } = <span class="cstat-no" title="statement not covered" >useWms({</span>
|
|
705
|
-
url:
|
|
713
|
+
url: undefined,
|
|
706
714
|
urlParameters: props.urlParameters,
|
|
707
715
|
});
|
|
708
716
|
|
|
@@ -733,6 +741,8 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
733
741
|
}, []);
|
|
734
742
|
|
|
735
743
|
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
744
|
+
<span class="cstat-no" title="statement not covered" > if (!initializedRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
745
|
+
|
|
736
746
|
<span class="cstat-no" title="statement not covered" > setUrl(props.url);</span>
|
|
737
747
|
}, [props.url]);
|
|
738
748
|
|
|
@@ -860,17 +870,19 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
860
870
|
// initialize the layer and add it to the MapLibre-gl instance or do something else with it
|
|
861
871
|
<span class="cstat-no" title="statement not covered" > initializedRef.current = true;</span>
|
|
862
872
|
<span class="cstat-no" title="statement not covered" > mapRef.current = mapContext.getMap(props.mapId);</span>
|
|
863
|
-
|
|
873
|
+
<span class="cstat-no" title="statement not covered" > console.log("set url " + props.url);</span>
|
|
874
|
+
<span class="cstat-no" title="statement not covered" > setUrl(props.url);</span>
|
|
875
|
+
}, [mapContext.mapIds, mapContext, props.mapId, props.url]);
|
|
864
876
|
|
|
865
877
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
866
878
|
<>
|
|
867
879
|
{error && <p>{error}</p>}
|
|
868
880
|
<h3 key="title">{capabilities?.Service?.Title}</h3>
|
|
881
|
+
{console.log(componentId.current)}
|
|
869
882
|
{capabilities?.Capability?.Layer?.Layer.map(<span class="fstat-no" title="function not covered" >(l</span>ayer, idx) => (
|
|
870
883
|
<span class="cstat-no" title="statement not covered" > <MlLayer</span>
|
|
871
|
-
layerId="Order-"
|
|
884
|
+
layerId={"Order-" + componentId.current + "-" + idx}
|
|
872
885
|
key={componentId.current + "-" + idx}
|
|
873
|
-
idSuffix={componentId.current + "-" + idx}
|
|
874
886
|
{...(idx > 0
|
|
875
887
|
? {
|
|
876
888
|
insertBeforeLayer: "Order-" + componentId.current + "-" + (idx - 1),
|
|
@@ -964,17 +976,17 @@ export default MlWmsLoader;
|
|
|
964
976
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
965
977
|
Code coverage generated by
|
|
966
978
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
967
|
-
at
|
|
979
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
968
980
|
</div>
|
|
969
981
|
</div>
|
|
970
|
-
<script src="
|
|
982
|
+
<script src="../../../prettify.js"></script>
|
|
971
983
|
<script>
|
|
972
984
|
window.onload = function () {
|
|
973
985
|
prettyPrint();
|
|
974
986
|
};
|
|
975
987
|
</script>
|
|
976
|
-
<script src="
|
|
977
|
-
<script src="
|
|
988
|
+
<script src="../../../sorter.js"></script>
|
|
989
|
+
<script src="../../../block-navigation.js"></script>
|
|
978
990
|
</body>
|
|
979
991
|
</html>
|
|
980
992
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for components/MlWmsLoader</title>
|
|
6
|
+
<title>Code coverage report for src/components/MlWmsLoader</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/MlWmsLoader</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/96</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/55</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/92</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="0" class="pct low">0%</td>
|
|
87
|
-
<td data-value="
|
|
87
|
+
<td data-value="96" class="abs low">0/96</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
|
-
<td data-value="
|
|
89
|
+
<td data-value="55" class="abs low">0/55</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
91
|
<td data-value="22" class="abs low">0/22</td>
|
|
92
92
|
<td data-value="0" class="pct low">0%</td>
|
|
93
|
-
<td data-value="
|
|
93
|
+
<td data-value="92" class="abs low">0/92</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,17 +101,17 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Thu Dec 23 2021 12:19:00 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
</div>
|
|
107
|
-
<script src="
|
|
107
|
+
<script src="../../../prettify.js"></script>
|
|
108
108
|
<script>
|
|
109
109
|
window.onload = function () {
|
|
110
110
|
prettyPrint();
|
|
111
111
|
};
|
|
112
112
|
</script>
|
|
113
|
-
<script src="
|
|
114
|
-
<script src="
|
|
113
|
+
<script src="../../../sorter.js"></script>
|
|
114
|
+
<script src="../../../block-navigation.js"></script>
|
|
115
115
|
</body>
|
|
116
116
|
</html>
|
|
117
117
|
|