@mapcomponents/react-maplibre 0.1.66 → 0.1.67
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/node_version_test.yml +1 -1
- package/.storybook/main.js +37 -31
- package/.storybook/preview.js +21 -0
- package/CHANGELOG.md +13 -0
- package/coverage/clover.xml +419 -344
- package/coverage/coverage-final.json +15 -14
- package/coverage/lcov-report/index.html +61 -61
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +24 -18
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +14 -14
- package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.cy.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +9 -9
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGpxViewer/MlGpxViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGpxViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +52 -40
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +10 -10
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +4 -4
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/{MlScaleReference.js.html → MlScaleReference.tsx.html} +57 -36
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +2 -2
- package/coverage/lcov-report/src/components/MlShareMapState/{MlShareMapState.js.html → MlShareMapState.tsx.html} +192 -84
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +20 -20
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/ColorPicker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/MlSketchTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreejsLayer.tsx.html +769 -0
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +25 -10
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +11 -11
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +11 -11
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +27 -18
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +11 -11
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +50 -26
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
- package/coverage/lcov-report/src/contexts/index.html +1 -1
- package/coverage/lcov-report/src/hooks/index.html +21 -21
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/useCameraFollowPath.tsx.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/lib.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useGpx/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +9 -9
- package/coverage/lcov-report/src/hooks/useLayerFilter/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerFilter/useLayerFilter.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx.html +9 -6
- package/coverage/lcov-report/src/hooks/useMap.ts.html +2 -2
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +8 -29
- package/coverage/lcov-report/src/hooks/useSource.ts.html +10 -10
- package/coverage/lcov-report/src/hooks/useWms.ts.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +80 -11
- package/coverage/lcov.info +741 -604
- package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +3 -0
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +17 -15
- package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +1 -1
- package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +1 -1
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +1 -1
- package/dist/components/MlCreatePdfForm/MlCreatePdfForm.stories.d.ts +1 -1
- package/dist/components/MlFeatureEditor/lib/create_supplementary_points.d.ts +1 -1
- package/dist/components/MlFeatureEditor/lib/create_vertex.d.ts +1 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +1 -1
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +1 -1
- package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +1 -1
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +1 -1
- package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +1 -1
- package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +1 -1
- package/dist/components/MlScaleReference/MlScaleReference.d.ts +7 -1
- package/dist/components/MlShareMapState/MlShareMapState.d.ts +32 -13
- package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +15 -9
- package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +1 -1
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +1 -1
- package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +1 -1
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +1 -1
- package/dist/components/MlThreeJsLayer/MlThreejsLayer.d.ts +29 -0
- package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +2 -1
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +1 -1
- package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +1 -1
- package/dist/contexts/MapContext.d.ts +13 -2
- package/dist/custom.d.d.ts +1 -1
- package/dist/decorators/MapContextDecorator.d.ts +1 -1
- package/dist/decorators/MapContextDecoratorHooks.d.ts +1 -1
- package/dist/decorators/MultiMapContextDecorator.d.ts +1 -1
- package/dist/decorators/NoNavToolsDecorator.d.ts +1 -1
- package/dist/decorators/ThemeWrapper.d.ts +1 -3
- package/dist/hooks/useCameraFollowPath/useCameraFollowPath.stories.d.ts +1 -1
- package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +1 -1
- package/dist/index.d.ts +18 -8
- package/dist/index.esm.js +5590 -3701
- package/dist/index.esm.js.map +1 -1
- package/dist/setupTests.d.ts +6 -6
- package/package.json +56 -49
- package/public/thumbnails/{MlGPXViewer.png → MlGpxViewer.png} +0 -0
- package/rollup.config.js +49 -48
- package/src/@types/assets/index.d.ts +20 -0
- package/src/components/MapLibreMap/MapLibreMap.stories.js +8 -1
- package/src/components/MapLibreMap/MapLibreMap.tsx +11 -9
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +49 -39
- package/src/components/MlCenterPosition/MlCenterPosition.tsx +1 -1
- package/src/components/MlFollowGps/MlFollowGps.tsx +8 -8
- package/src/components/MlLayerMagnify/MlLayerMagnify.tsx +21 -17
- package/src/components/MlLayerSwipe/MlLayerSwipe.tsx +3 -3
- package/src/components/MlScaleReference/{MlScaleReference.js → MlScaleReference.tsx} +38 -31
- package/src/components/MlShareMapState/MlShareMapState.stories.tsx +100 -0
- package/src/components/MlShareMapState/{MlShareMapState.js → MlShareMapState.tsx} +94 -58
- package/src/components/MlThreeJsLayer/MlThreejsLayer.tsx +228 -0
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +7 -4
- package/src/contexts/MapContext.tsx +26 -19
- package/src/custom.d.ts +5 -0
- package/src/decorators/MapContextDecorator.js +39 -28
- package/src/decorators/MapContextDecoratorHooks.js +18 -8
- package/src/decorators/MultiMapContextDecorator.js +79 -69
- package/src/decorators/NoNavToolsDecorator.js +34 -25
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx +5 -4
- package/src/hooks/useMap.ts +1 -1
- package/src/hooks/useMapState.ts +6 -13
- package/src/hooks/useSource.ts +1 -1
- package/src/index.ts +31 -8
- package/src/ui_components/TopToolbar.tsx +1 -1
- package/tsconfig.json +1 -0
- package/src/components/MlShareMapState/MlShareMapState.stories.js +0 -100
- package/src/custom.d.tsx +0 -26
- package/src/decorators/ThemeWrapper.tsx +0 -9
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">28.87% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>41/
|
|
28
|
+
<span class='fraction'>41/142</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">28.84% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>15/
|
|
35
|
+
<span class='fraction'>15/52</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">27.77% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>5/
|
|
42
|
+
<span class='fraction'>5/18</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">28.26% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>39/
|
|
49
|
+
<span class='fraction'>39/138</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
</div>
|
|
62
62
|
</template>
|
|
63
63
|
</div>
|
|
64
|
-
<div class='status-line
|
|
64
|
+
<div class='status-line low'></div>
|
|
65
65
|
<div class="pad1">
|
|
66
66
|
<table class="coverage-summary">
|
|
67
67
|
<thead>
|
|
@@ -93,6 +93,21 @@
|
|
|
93
93
|
<td data-value="68" class="abs medium">39/68</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
|
+
<tr>
|
|
97
|
+
<td class="file low" data-value="MlThreejsLayer.tsx"><a href="MlThreejsLayer.tsx.html">MlThreejsLayer.tsx</a></td>
|
|
98
|
+
<td data-value="0" class="pic low">
|
|
99
|
+
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
100
|
+
</td>
|
|
101
|
+
<td data-value="0" class="pct low">0%</td>
|
|
102
|
+
<td data-value="72" class="abs low">0/72</td>
|
|
103
|
+
<td data-value="0" class="pct low">0%</td>
|
|
104
|
+
<td data-value="28" class="abs low">0/28</td>
|
|
105
|
+
<td data-value="0" class="pct low">0%</td>
|
|
106
|
+
<td data-value="9" class="abs low">0/9</td>
|
|
107
|
+
<td data-value="0" class="pct low">0%</td>
|
|
108
|
+
<td data-value="70" class="abs low">0/70</td>
|
|
109
|
+
</tr>
|
|
110
|
+
|
|
96
111
|
</tbody>
|
|
97
112
|
</table>
|
|
98
113
|
</div>
|
|
@@ -101,7 +116,7 @@
|
|
|
101
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
117
|
Code coverage generated by
|
|
103
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
119
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
120
|
</div>
|
|
106
121
|
<script src="../../../prettify.js"></script>
|
|
107
122
|
<script>
|
|
@@ -391,7 +391,7 @@ export default MlTransitionGeoJsonLayer;
|
|
|
391
391
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
392
392
|
Code coverage generated by
|
|
393
393
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
394
|
-
at 2023-01-
|
|
394
|
+
at 2023-01-30T08:41:54.902Z
|
|
395
395
|
</div>
|
|
396
396
|
<script src="../../../prettify.js"></script>
|
|
397
397
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -295,7 +295,7 @@ export default MlUseMapDebugger;
|
|
|
295
295
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
296
296
|
Code coverage generated by
|
|
297
297
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
298
|
-
at 2023-01-
|
|
298
|
+
at 2023-01-30T08:41:54.902Z
|
|
299
299
|
</div>
|
|
300
300
|
<script src="../../../prettify.js"></script>
|
|
301
301
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -490,7 +490,7 @@ export default MlVectorTileLayer;
|
|
|
490
490
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
491
491
|
Code coverage generated by
|
|
492
492
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
493
|
-
at 2023-01-
|
|
493
|
+
at 2023-01-30T08:41:54.902Z
|
|
494
494
|
</div>
|
|
495
495
|
<script src="../../../prettify.js"></script>
|
|
496
496
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html
CHANGED
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">14.28% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>3/21</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">15% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>3/20</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -141,7 +141,7 @@
|
|
|
141
141
|
<span class="cline-any cline-neutral"> </span>
|
|
142
142
|
<span class="cline-any cline-neutral"> </span>
|
|
143
143
|
<span class="cline-any cline-neutral"> </span>
|
|
144
|
-
<span class="cline-any cline-
|
|
144
|
+
<span class="cline-any cline-yes">10x</span>
|
|
145
145
|
<span class="cline-any cline-neutral"> </span>
|
|
146
146
|
<span class="cline-any cline-no"> </span>
|
|
147
147
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -180,11 +180,11 @@
|
|
|
180
180
|
<span class="cline-any cline-no"> </span>
|
|
181
181
|
<span class="cline-any cline-neutral"> </span>
|
|
182
182
|
<span class="cline-any cline-neutral"> </span>
|
|
183
|
-
<span class="cline-any cline-
|
|
183
|
+
<span class="cline-any cline-yes">10x</span>
|
|
184
184
|
<span class="cline-any cline-neutral"> </span>
|
|
185
185
|
<span class="cline-any cline-neutral"> </span>
|
|
186
186
|
<span class="cline-any cline-neutral"> </span>
|
|
187
|
-
<span class="cline-any cline-
|
|
187
|
+
<span class="cline-any cline-yes">10x</span>
|
|
188
188
|
<span class="cline-any cline-neutral"> </span>
|
|
189
189
|
<span class="cline-any cline-neutral"> </span>
|
|
190
190
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -205,7 +205,7 @@ import { v4 as uuidv4 } from "uuid";
|
|
|
205
205
|
*
|
|
206
206
|
* @component
|
|
207
207
|
*/
|
|
208
|
-
const MlWmsFeatureInfoPopup = <span class="
|
|
208
|
+
const MlWmsFeatureInfoPopup = <span class="fstat-no" title="function not covered" >(p</span>rops) => {
|
|
209
209
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
210
210
|
const mapContext = <span class="cstat-no" title="statement not covered" >useContext(MapContext);</span>
|
|
211
211
|
|
|
@@ -244,11 +244,11 @@ const MlWmsFeatureInfoPopup = <span class="cstat-no" title="statement not covere
|
|
|
244
244
|
<span class="cstat-no" title="statement not covered" > return <></>;</span>
|
|
245
245
|
};
|
|
246
246
|
|
|
247
|
-
|
|
247
|
+
MlWmsFeatureInfoPopup.defaultProps = {
|
|
248
248
|
mapId: undefined,
|
|
249
249
|
};
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
MlWmsFeatureInfoPopup.propTypes = {
|
|
252
252
|
/**
|
|
253
253
|
* Id of the target MapLibre instance in mapContext
|
|
254
254
|
*/
|
|
@@ -262,7 +262,7 @@ 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 noreferrer">istanbul</a>
|
|
265
|
-
at 2023-01-
|
|
265
|
+
at 2023-01-30T08:41:54.902Z
|
|
266
266
|
</div>
|
|
267
267
|
<script src="../../../prettify.js"></script>
|
|
268
268
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">14.28% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>3/21</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">15% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>3/20</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
82
|
<td class="file low" data-value="MlWmsFeatureInfoPopup.js"><a href="MlWmsFeatureInfoPopup.js.html">MlWmsFeatureInfoPopup.js</a></td>
|
|
83
|
-
<td data-value="
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
83
|
+
<td data-value="14.28" class="pic low">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 14%"></div><div class="cover-empty" style="width: 86%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="21" class="abs low">
|
|
86
|
+
<td data-value="14.28" class="pct low">14.28%</td>
|
|
87
|
+
<td data-value="21" class="abs low">3/21</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
89
|
<td data-value="8" class="abs low">0/8</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
91
|
<td data-value="4" class="abs low">0/4</td>
|
|
92
|
-
<td data-value="
|
|
93
|
-
<td data-value="20" class="abs low">
|
|
92
|
+
<td data-value="15" class="pct low">15%</td>
|
|
93
|
+
<td data-value="20" class="abs low">3/20</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -724,7 +724,7 @@ export default MlWmsLayer;
|
|
|
724
724
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
725
725
|
Code coverage generated by
|
|
726
726
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
727
|
-
at 2023-01-
|
|
727
|
+
at 2023-01-30T08:41:54.902Z
|
|
728
728
|
</div>
|
|
729
729
|
<script src="../../../prettify.js"></script>
|
|
730
730
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">3.7% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>4/108</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">3.92% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>4/102</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -399,7 +399,10 @@
|
|
|
399
399
|
<a name='L334'></a><a href='#L334'>334</a>
|
|
400
400
|
<a name='L335'></a><a href='#L335'>335</a>
|
|
401
401
|
<a name='L336'></a><a href='#L336'>336</a>
|
|
402
|
-
<a name='L337'></a><a href='#L337'>337</a
|
|
402
|
+
<a name='L337'></a><a href='#L337'>337</a>
|
|
403
|
+
<a name='L338'></a><a href='#L338'>338</a>
|
|
404
|
+
<a name='L339'></a><a href='#L339'>339</a>
|
|
405
|
+
<a name='L340'></a><a href='#L340'>340</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
403
406
|
<span class="cline-any cline-neutral"> </span>
|
|
404
407
|
<span class="cline-any cline-neutral"> </span>
|
|
405
408
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -419,8 +422,8 @@
|
|
|
419
422
|
<span class="cline-any cline-neutral"> </span>
|
|
420
423
|
<span class="cline-any cline-neutral"> </span>
|
|
421
424
|
<span class="cline-any cline-neutral"> </span>
|
|
422
|
-
<span class="cline-any cline-
|
|
423
|
-
<span class="cline-any cline-
|
|
425
|
+
<span class="cline-any cline-yes">10x</span>
|
|
426
|
+
<span class="cline-any cline-yes">10x</span>
|
|
424
427
|
<span class="cline-any cline-no"> </span>
|
|
425
428
|
<span class="cline-any cline-no"> </span>
|
|
426
429
|
<span class="cline-any cline-no"> </span>
|
|
@@ -468,7 +471,7 @@
|
|
|
468
471
|
<span class="cline-any cline-neutral"> </span>
|
|
469
472
|
<span class="cline-any cline-neutral"> </span>
|
|
470
473
|
<span class="cline-any cline-neutral"> </span>
|
|
471
|
-
<span class="cline-any cline-
|
|
474
|
+
<span class="cline-any cline-yes">10x</span>
|
|
472
475
|
<span class="cline-any cline-neutral"> </span>
|
|
473
476
|
<span class="cline-any cline-no"> </span>
|
|
474
477
|
<span class="cline-any cline-no"> </span>
|
|
@@ -519,6 +522,7 @@
|
|
|
519
522
|
<span class="cline-any cline-neutral"> </span>
|
|
520
523
|
<span class="cline-any cline-no"> </span>
|
|
521
524
|
<span class="cline-any cline-neutral"> </span>
|
|
525
|
+
<span class="cline-any cline-neutral"> </span>
|
|
522
526
|
<span class="cline-any cline-no"> </span>
|
|
523
527
|
<span class="cline-any cline-no"> </span>
|
|
524
528
|
<span class="cline-any cline-no"> </span>
|
|
@@ -591,6 +595,8 @@
|
|
|
591
595
|
<span class="cline-any cline-neutral"> </span>
|
|
592
596
|
<span class="cline-any cline-no"> </span>
|
|
593
597
|
<span class="cline-any cline-neutral"> </span>
|
|
598
|
+
<span class="cline-any cline-neutral"> </span>
|
|
599
|
+
<span class="cline-any cline-neutral"> </span>
|
|
594
600
|
<span class="cline-any cline-no"> </span>
|
|
595
601
|
<span class="cline-any cline-no"> </span>
|
|
596
602
|
<span class="cline-any cline-no"> </span>
|
|
@@ -722,7 +728,7 @@
|
|
|
722
728
|
<span class="cline-any cline-neutral"> </span>
|
|
723
729
|
<span class="cline-any cline-neutral"> </span>
|
|
724
730
|
<span class="cline-any cline-neutral"> </span>
|
|
725
|
-
<span class="cline-any cline-
|
|
731
|
+
<span class="cline-any cline-yes">10x</span>
|
|
726
732
|
<span class="cline-any cline-neutral"> </span>
|
|
727
733
|
<span class="cline-any cline-neutral"> </span>
|
|
728
734
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -737,7 +743,7 @@
|
|
|
737
743
|
<span class="cline-any cline-neutral"> </span>
|
|
738
744
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useRef, useEffect, useContext, useCallback, useState, useMemo } from 'react';
|
|
739
745
|
|
|
740
|
-
import MapContext from '../../contexts/MapContext';
|
|
746
|
+
import MapContext, { MapContextType } from '../../contexts/MapContext';
|
|
741
747
|
import { v4 as uuidv4 } from 'uuid';
|
|
742
748
|
|
|
743
749
|
import MlWmsLayer from '../MlWmsLayer/MlWmsLayer';
|
|
@@ -750,13 +756,13 @@ import List from '@mui/material/List';
|
|
|
750
756
|
import ListItem from '@mui/material/ListItem';
|
|
751
757
|
import ListItemText from '@mui/material/ListItemText';
|
|
752
758
|
import IconButton from '@mui/material/IconButton';
|
|
753
|
-
import { LngLat } from 'maplibre-gl';
|
|
759
|
+
import { LngLat, MapMouseEvent } from 'maplibre-gl';
|
|
754
760
|
import MapLibreGlWrapper from '../MapLibreMap/lib/MapLibreGlWrapper';
|
|
755
761
|
import { Layer2, Layer3 } from 'wms-capabilities';
|
|
756
762
|
import { useWmsReturnType } from '../../hooks/useWms';
|
|
757
763
|
|
|
758
|
-
const originShift =
|
|
759
|
-
const lngLatToMeters = <span class="
|
|
764
|
+
const originShift = (2 * Math.PI * 6378137) / 2.0;
|
|
765
|
+
const lngLatToMeters = <span class="fstat-no" title="function not covered" >fu</span>nction (lnglat: LngLat, accuracy = <span class="branch-0 cbranch-no" title="branch not covered" >{ enable: true, decimal: 1 })</span> {
|
|
760
766
|
const lng = <span class="cstat-no" title="statement not covered" >lnglat.lng;</span>
|
|
761
767
|
const lat = <span class="cstat-no" title="statement not covered" >lnglat.lat;</span>
|
|
762
768
|
let x = <span class="cstat-no" title="statement not covered" >(lng * originShift) / 180.0;</span>
|
|
@@ -804,7 +810,7 @@ export type LayerType = {
|
|
|
804
810
|
*
|
|
805
811
|
* @component
|
|
806
812
|
*/
|
|
807
|
-
const MlWmsLoader = <span class="
|
|
813
|
+
const MlWmsLoader = <span class="fstat-no" title="function not covered" >(p</span>rops: MlWmsLoaderProps) => {
|
|
808
814
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
809
815
|
const mapContext: MapContextType = <span class="cstat-no" title="statement not covered" >useContext(MapContext);</span>
|
|
810
816
|
const { capabilities, error, setUrl, getFeatureInfoUrl, wmsUrl }: useWmsReturnType = <span class="cstat-no" title="statement not covered" >useWms({</span>
|
|
@@ -854,7 +860,8 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
854
860
|
}, [layers]);
|
|
855
861
|
|
|
856
862
|
const getFeatureInfo = <span class="cstat-no" title="statement not covered" >useCallback(</span>
|
|
857
|
-
|
|
863
|
+
// eslint-disable-next-line @typescript-eslint/ban-types
|
|
864
|
+
<span class="fstat-no" title="function not covered" > (e</span>v:(MapMouseEvent & Object)) => {
|
|
858
865
|
<span class="cstat-no" title="statement not covered" > if (!mapRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
859
866
|
<span class="cstat-no" title="statement not covered" > setFeatureInfoLngLat(undefined);</span>
|
|
860
867
|
<span class="cstat-no" title="statement not covered" > setFeatureInfoContent(undefined);</span>
|
|
@@ -927,7 +934,9 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
927
934
|
|
|
928
935
|
const _getFeatureInfo = <span class="cstat-no" title="statement not covered" >getFeatureInfo;</span>
|
|
929
936
|
|
|
930
|
-
|
|
937
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
938
|
+
// @ts-ignore: ts appears not to consider overloads
|
|
939
|
+
<span class="cstat-no" title="statement not covered" > mapRef.current.map.on('click', _getFeatureInfo, componentId.current);</span>
|
|
931
940
|
<span class="cstat-no" title="statement not covered" > return <span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
932
941
|
<span class="cstat-no" title="statement not covered" > mapRef.current?.map.off?.('click', _getFeatureInfo);</span>
|
|
933
942
|
};
|
|
@@ -1058,7 +1067,7 @@ const MlWmsLoader = <span class="cstat-no" title="statement not covered" ><span
|
|
|
1058
1067
|
);
|
|
1059
1068
|
};
|
|
1060
1069
|
|
|
1061
|
-
|
|
1070
|
+
MlWmsLoader.defaultProps = {
|
|
1062
1071
|
url: '',
|
|
1063
1072
|
urlParameters: {
|
|
1064
1073
|
SERVICE: 'WMS',
|
|
@@ -1078,7 +1087,7 @@ export default MlWmsLoader;
|
|
|
1078
1087
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1079
1088
|
Code coverage generated by
|
|
1080
1089
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1081
|
-
at 2023-01-
|
|
1090
|
+
at 2023-01-30T08:41:54.902Z
|
|
1082
1091
|
</div>
|
|
1083
1092
|
<script src="../../../prettify.js"></script>
|
|
1084
1093
|
<script>
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">3.7% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>4/108</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">3.92% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>4/102</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
82
|
<td class="file low" data-value="MlWmsLoader.tsx"><a href="MlWmsLoader.tsx.html">MlWmsLoader.tsx</a></td>
|
|
83
|
-
<td data-value="
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
83
|
+
<td data-value="3.7" class="pic low">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 3%"></div><div class="cover-empty" style="width: 97%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="108" class="abs low">
|
|
86
|
+
<td data-value="3.7" class="pct low">3.7%</td>
|
|
87
|
+
<td data-value="108" class="abs low">4/108</td>
|
|
88
88
|
<td data-value="0" class="pct low">0%</td>
|
|
89
89
|
<td data-value="62" class="abs low">0/62</td>
|
|
90
90
|
<td data-value="0" class="pct low">0%</td>
|
|
91
91
|
<td data-value="30" class="abs low">0/30</td>
|
|
92
|
-
<td data-value="
|
|
93
|
-
<td data-value="102" class="abs low">
|
|
92
|
+
<td data-value="3.92" class="pct low">3.92%</td>
|
|
93
|
+
<td data-value="102" class="abs low">4/102</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,7 +101,7 @@
|
|
|
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 noreferrer">istanbul</a>
|
|
104
|
-
at 2023-01-
|
|
104
|
+
at 2023-01-30T08:41:54.902Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|