@mapcomponents/react-maplibre 0.1.63 → 0.1.65
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/.editorconfig +1 -1
- package/.eslintrc.js +9 -6
- package/.github/workflows/check-catalogue-metadata-schema.yml +19 -0
- package/CHANGELOG.md +37 -2
- package/coverage/clover.xml +688 -1032
- package/coverage/coverage-final.json +25 -21
- package/coverage/lcov-report/index.html +127 -82
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +24 -24
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +5 -5
- package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +2 -2
- 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 +2 -5
- 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 +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +40 -19
- 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 +112 -0
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +115 -0
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +34 -4
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGpxViewer/MlGpxViewer.tsx.html +394 -0
- package/coverage/lcov-report/src/components/{MlGPXViewer → MlGpxViewer}/index.html +23 -38
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +63 -285
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +21 -21
- 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 +58 -76
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +58 -61
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +11 -11
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +30 -21
- 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 +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- 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 +2 -2
- package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.html +514 -0
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +21 -21
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +20 -206
- 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 +10 -7
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +5 -5
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +111 -57
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +19 -19
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +201 -144
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +9 -9
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +23 -23
- 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 +50 -50
- 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 +116 -0
- package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +295 -0
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +132 -66
- package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +1 -1
- package/coverage/lcov-report/src/hooks/useLayerFilter/index.html +116 -0
- package/coverage/lcov-report/src/hooks/useLayerFilter/useLayerFilter.ts.html +184 -0
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/index.html +116 -0
- package/coverage/lcov-report/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx.html +331 -0
- package/coverage/lcov-report/src/hooks/useMap.ts.html +47 -47
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +54 -54
- package/coverage/lcov-report/src/hooks/useSource.ts.html +57 -57
- package/coverage/lcov-report/src/hooks/{useWms.js.html → useWms.ts.html} +54 -15
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +6 -6
- package/coverage/lcov.info +1320 -1960
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +51 -25
- package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +3 -2
- package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +35 -16
- package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +1 -1
- package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +12 -9
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +1 -1
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +12 -9
- package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +1 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +22 -11
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +4 -95
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +3 -0
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +3 -0
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +1 -1
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +12 -9
- package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +30 -0
- package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +17 -0
- package/dist/components/MlGpxViewer/MlGpxViewer.test.d.ts +1 -0
- package/dist/components/MlGpxViewer/util/GeoJsonContext.d.ts +10 -0
- package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +4 -0
- package/dist/components/MlGpxViewer/util/MetadataDrawer.d.ts +7 -0
- package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +10 -0
- package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +3 -0
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +11 -2
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +7 -9
- package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +8 -2
- package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +13 -9
- package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +13 -3
- package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +12 -10
- package/dist/components/MlSketchTool/MlSketchTool.d.ts +1 -1
- package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +13 -9
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +33 -14
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +18 -15
- package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +14 -0
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +20 -15
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +3 -67
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +20 -12
- package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +7 -4
- package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +17 -10
- package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +23 -12
- package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +3 -0
- package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +6 -0
- package/dist/decorators/ThemeWrapper.d.ts +3 -1
- package/dist/hooks/useGpx/lib/gpxConverter.d.ts +11 -0
- package/dist/hooks/useGpx/useGpx.d.ts +26 -0
- package/dist/hooks/useGpx/useGpx.stories.d.ts +10 -0
- package/dist/hooks/useLayer.d.ts +13 -7
- package/dist/hooks/useLayerFilter/useLayerFilter.d.ts +8 -0
- package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +9 -0
- package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.d.ts +23 -0
- package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +10 -0
- package/dist/hooks/useMap.d.ts +1 -1
- package/dist/hooks/useMap.test.d.ts +1 -0
- package/dist/hooks/useSource.d.ts +2 -2
- package/dist/hooks/useWms.d.ts +24 -16
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +9310 -14006
- package/dist/index.esm.js.map +1 -1
- package/dist/setupTests.d.ts +6 -5
- package/dist/ui_components/Dropzone.d.ts +5 -0
- package/dist/ui_components/ImageLoader.d.ts +8 -1
- package/dist/ui_components/LoadingOverlayContext.d.ts +11 -11
- package/dist/ui_components/Sidebar.d.ts +7 -6
- package/dist/ui_components/Tooltip.d.ts +1 -1
- package/dist/ui_components/TopToolbar.d.ts +4 -3
- package/dist/ui_components/UploadButton.d.ts +6 -0
- package/dist/util/BubbleForInstructions.d.ts +2 -0
- package/dist/util/Instructions.d.ts +13 -0
- package/package.json +195 -191
- package/{src/components/MlImageMarkerLayer → public}/assets/wg-marker.png +0 -0
- package/scripts/build-catalogue-meta.js +35 -11
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +230 -188
- package/src/components/MlCenterPosition/MlCenterPosition.meta_.json +1 -2
- package/src/components/MlCenterPosition/MlCenterPosition.stories.tsx +20 -0
- package/src/components/MlCenterPosition/MlCenterPosition.tsx +4 -4
- package/src/components/MlComponentTemplate/MlComponentTemplate.meta_.json +1 -2
- package/src/components/MlComponentTemplate/{MlComponentTemplate.stories.js → MlComponentTemplate.stories.tsx} +2 -2
- package/src/components/MlComponentTemplate/MlComponentTemplate.tsx +1 -1
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta_.json +1 -2
- package/src/components/MlCreatePdfButton/{MlCreatePdfButton.stories.js → MlCreatePdfButton.stories.tsx} +1 -1
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx +1 -1
- package/src/components/MlCreatePdfForm/MlCreatePdfForm.meta.json +1 -2
- package/src/components/MlCreatePdfForm/lib/PdfForm.tsx +25 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +1 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +0 -1
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.meta.json +1 -2
- package/src/components/MlFollowGps/MlFollowGps.meta.json +1 -2
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -2
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.tsx +89 -0
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +24 -17
- package/src/components/MlGeoJsonLayer/assets/earthquake.json +109937 -0
- package/src/components/MlGeoJsonLayer/assets/wg_locations.json +65 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx +9 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx +10 -0
- package/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.meta_.json +1 -2
- package/src/components/MlGeojsonLayerWithSource/{MlGeojsonLayerWithSource.stories.js → MlGeojsonLayerWithSource.stories.tsx} +0 -0
- package/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx +1 -1
- package/src/components/{MlGPXViewer/MlGPXViewer.doc.de.md → MlGpxViewer/MlGpxViewer.doc.de.md} +0 -0
- package/src/components/{MlGPXViewer/MlGPXViewer.doc.en.md → MlGpxViewer/MlGpxViewer.doc.en.md} +0 -0
- package/src/components/{MlGPXViewer/MlGPXViewer.meta.json → MlGpxViewer/MlGpxViewer.meta.json} +2 -3
- package/src/components/MlGpxViewer/MlGpxViewer.stories.tsx +109 -0
- package/src/components/MlGpxViewer/MlGpxViewer.test.js +53 -0
- package/src/components/MlGpxViewer/MlGpxViewer.tsx +103 -0
- package/src/components/{MlGPXViewer → MlGpxViewer}/util/GeoJsonContext.ts +0 -0
- package/src/components/{MlGPXViewer → MlGpxViewer}/util/GeoJsonProvider.tsx +0 -0
- package/src/components/MlGpxViewer/util/MetadataDrawer.tsx +38 -0
- package/src/components/MlGpxViewer/util/MlGpxDemoLoader.tsx +128 -0
- package/src/components/MlGpxViewer/util/MlGpxViewerInstructions.tsx +71 -0
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.meta_.json +1 -2
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.tsx +41 -0
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +27 -8
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +41 -115
- package/src/components/MlLayer/MlLayer.meta_.json +1 -2
- package/src/components/MlLayerMagnify/MlLayerMagnify.meta.json +1 -2
- package/src/components/MlLayerMagnify/MlLayerMagnify.stories.tsx +44 -0
- package/src/components/MlLayerMagnify/{MlLayerMagnify.test.js → MlLayerMagnify.test.tsx} +15 -18
- package/src/components/MlLayerMagnify/MlLayerMagnify.tsx +55 -61
- package/src/components/MlLayerSwipe/MlLayerSwipe.meta.json +1 -2
- package/src/components/MlLayerSwipe/{MlLayerSwipe.stories.js → MlLayerSwipe.stories.tsx} +9 -11
- package/src/components/MlLayerSwipe/MlLayerSwipe.tsx +47 -48
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.meta_.json +1 -2
- package/src/components/MlLayerSwitcher/components/LayerBox.js +22 -19
- package/src/components/MlMarker/MlMarker.meta_.json +1 -2
- package/src/components/MlMeasureTool/MlMeasureTool.meta.json +1 -2
- package/src/components/MlNavigationCompass/MlNavigationCompass.meta.json +1 -2
- package/src/components/MlNavigationTools/MlNavigationTools.meta.json +1 -2
- package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -2
- package/src/components/MlShareMapState/MlShareMapState.meta_.json +1 -2
- package/src/components/MlSketchTool/MlSketchTool.meta.json +1 -2
- package/src/components/MlSketchTool/{MlSketchTool.stories.js → MlSketchTool.stories.tsx} +1 -1
- package/src/components/MlSketchTool/MlSketchTool.tsx +1 -1
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.meta.json +1 -2
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.tsx +121 -0
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.js +30 -1
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx +143 -0
- package/src/components/MlSpatialElevationProfile/util/getElevationData.tsx +103 -0
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.meta.json +1 -2
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.stories.tsx +37 -0
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.meta.json +1 -2
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.js +2 -3
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +17 -79
- package/src/components/MlUseMapDebugger/MlUseMapDebugger.meta_.json +1 -2
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +1 -2
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +3 -2
- package/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.meta_.json +1 -2
- package/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.tsx +22 -0
- package/src/components/MlWmsLayer/MlWmsLayer.tsx +59 -41
- package/src/components/MlWmsLoader/MlWmsLoader.meta.json +1 -2
- package/src/components/MlWmsLoader/MlWmsLoader.stories.tsx +89 -0
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +141 -122
- package/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.tsx +50 -0
- package/src/components/MlWmsLoader/utils/WMSLinks.tsx +128 -0
- package/src/decorators/MapContextDecorator.js +1 -1
- package/src/decorators/MapContextDecoratorHooks.js +1 -1
- package/src/decorators/ThemeWrapper.tsx +9 -0
- package/src/hooks/useCameraFollowPath/useCameraFollowPath.meta.json +1 -2
- package/src/{components/MlGPXViewer → hooks/useGpx/lib}/gpxConverter.js +1 -0
- package/src/hooks/useGpx/useGpx.doc.de.md +3 -0
- package/src/hooks/useGpx/useGpx.meta_.json +15 -0
- package/src/{components/MlLayer/MlLayer.stories.js → hooks/useGpx/useGpx.stories.js} +4 -4
- package/src/hooks/useGpx/useGpx.tsx +70 -0
- package/src/hooks/useLayer.ts +32 -10
- package/src/hooks/useLayerFilter/useLayerFilter.doc.de.md +3 -0
- package/src/hooks/useLayerFilter/useLayerFilter.meta_.json +14 -0
- package/src/hooks/useLayerFilter/useLayerFilter.stories.tsx +40 -0
- package/src/hooks/useLayerFilter/useLayerFilter.ts +33 -0
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.doc.de.md +3 -0
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.meta_.json +15 -0
- package/src/{components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.js → hooks/useLayerHoverPopup/useLayerHoverPopup.stories.js} +4 -6
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx +82 -0
- package/src/hooks/useMap.test.tsx +48 -0
- package/src/hooks/useMap.ts +8 -8
- package/src/hooks/useSource.ts +4 -4
- package/src/hooks/{useWms.js → useWms.ts} +24 -11
- package/src/index.ts +5 -5
- package/src/setupTests.js +18 -15
- package/src/ui_components/Dropzone.tsx +104 -0
- package/src/ui_components/{ImageLoader.js → ImageLoader.tsx} +30 -25
- package/src/ui_components/{LoadingOverlayContext.js → LoadingOverlayContext.tsx} +12 -15
- package/src/ui_components/Sidebar.tsx +12 -10
- package/src/ui_components/Tooltip.tsx +17 -0
- package/src/ui_components/TopToolbar.tsx +5 -3
- package/src/ui_components/UploadButton.tsx +57 -0
- package/src/util/BubbleForInstructions.js +46 -0
- package/src/util/Instructions.tsx +60 -0
- package/tsconfig.json +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +0 -1222
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +0 -1645
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +0 -757
- package/dist/components/MlGPXViewer/util/MlGPXViewerInstructions.d.ts +0 -1
- package/dist/components/MlGPXViewer/util/SampleLayer.d.ts +0 -0
- package/dist/components/MlGPXViewer/util/demoViewer.d.ts +0 -5
- package/src/components/MlCenterPosition/MlCenterPosition.stories.js +0 -21
- package/src/components/MlGPXViewer/MlGPXViewer.stories.js +0 -91
- package/src/components/MlGPXViewer/MlGPXViewer.test.js +0 -28
- package/src/components/MlGPXViewer/MlGPXViewer.tsx +0 -379
- package/src/components/MlGPXViewer/util/MlGPXViewerInstructions.js +0 -145
- package/src/components/MlGPXViewer/util/SampleLayer.js +0 -2
- package/src/components/MlGPXViewer/util/demoViewer.js +0 -254
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.js +0 -45
- package/src/components/MlLayerMagnify/MlLayerMagnify.stories.js +0 -41
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js +0 -224
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +0 -57
- package/src/components/MlThreeJsLayer/MlThreeJsLayer.stories.js +0 -39
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +0 -47
- package/src/decorators/ThemeWrapper.jsx +0 -9
- package/src/ui_components/Legend.js +0 -44
- package/src/ui_components/LoadingOverlay.js +0 -41
- package/src/ui_components/Tooltip.js +0 -21
|
@@ -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">79.31% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>23/29</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">55% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>11/20</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">100% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>6/6</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">80.76% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>21/26</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 medium'></div>
|
|
65
65
|
<pre><table class="coverage">
|
|
66
66
|
<tr><td class="line-count quiet"><a name='L1'></a><a href='#L1'>1</a>
|
|
67
67
|
<a name='L2'></a><a href='#L2'>2</a>
|
|
@@ -166,38 +166,38 @@
|
|
|
166
166
|
<span class="cline-any cline-neutral"> </span>
|
|
167
167
|
<span class="cline-any cline-neutral"> </span>
|
|
168
168
|
<span class="cline-any cline-neutral"> </span>
|
|
169
|
-
<span class="cline-any cline-
|
|
169
|
+
<span class="cline-any cline-yes">40x</span>
|
|
170
170
|
<span class="cline-any cline-neutral"> </span>
|
|
171
171
|
<span class="cline-any cline-neutral"> </span>
|
|
172
172
|
<span class="cline-any cline-neutral"> </span>
|
|
173
|
-
<span class="cline-any cline-
|
|
174
|
-
<span class="cline-any cline-
|
|
175
|
-
<span class="cline-any cline-
|
|
173
|
+
<span class="cline-any cline-yes">40x</span>
|
|
174
|
+
<span class="cline-any cline-yes">40x</span>
|
|
175
|
+
<span class="cline-any cline-yes">40x</span>
|
|
176
176
|
<span class="cline-any cline-neutral"> </span>
|
|
177
177
|
<span class="cline-any cline-neutral"> </span>
|
|
178
178
|
<span class="cline-any cline-neutral"> </span>
|
|
179
|
-
<span class="cline-any cline-
|
|
180
|
-
<span class="cline-any cline-
|
|
181
|
-
<span class="cline-any cline-
|
|
179
|
+
<span class="cline-any cline-yes">40x</span>
|
|
180
|
+
<span class="cline-any cline-yes">10x</span>
|
|
181
|
+
<span class="cline-any cline-yes">10x</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-no"> </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>
|
|
191
|
-
<span class="cline-any cline-
|
|
191
|
+
<span class="cline-any cline-yes">10x</span>
|
|
192
192
|
<span class="cline-any cline-neutral"> </span>
|
|
193
193
|
<span class="cline-any cline-neutral"> </span>
|
|
194
|
-
<span class="cline-any cline-
|
|
195
|
-
<span class="cline-any cline-
|
|
196
|
-
<span class="cline-any cline-
|
|
194
|
+
<span class="cline-any cline-yes">40x</span>
|
|
195
|
+
<span class="cline-any cline-yes">40x</span>
|
|
196
|
+
<span class="cline-any cline-yes">10x</span>
|
|
197
197
|
<span class="cline-any cline-neutral"> </span>
|
|
198
198
|
<span class="cline-any cline-neutral"> </span>
|
|
199
|
-
<span class="cline-any cline-
|
|
200
|
-
<span class="cline-any cline-
|
|
199
|
+
<span class="cline-any cline-yes">40x</span>
|
|
200
|
+
<span class="cline-any cline-yes">16x</span>
|
|
201
201
|
<span class="cline-any cline-neutral"> </span>
|
|
202
202
|
<span class="cline-any cline-neutral"> </span>
|
|
203
203
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -207,11 +207,11 @@
|
|
|
207
207
|
<span class="cline-any cline-neutral"> </span>
|
|
208
208
|
<span class="cline-any cline-neutral"> </span>
|
|
209
209
|
<span class="cline-any cline-neutral"> </span>
|
|
210
|
-
<span class="cline-any cline-
|
|
211
|
-
<span class="cline-any cline-
|
|
212
|
-
<span class="cline-any cline-
|
|
213
|
-
<span class="cline-any cline-
|
|
214
|
-
<span class="cline-any cline-
|
|
210
|
+
<span class="cline-any cline-yes">40x</span>
|
|
211
|
+
<span class="cline-any cline-yes">20x</span>
|
|
212
|
+
<span class="cline-any cline-yes">15x</span>
|
|
213
|
+
<span class="cline-any cline-yes">15x</span>
|
|
214
|
+
<span class="cline-any cline-yes">5x</span>
|
|
215
215
|
<span class="cline-any cline-no"> </span>
|
|
216
216
|
<span class="cline-any cline-no"> </span>
|
|
217
217
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -222,7 +222,7 @@
|
|
|
222
222
|
<span class="cline-any cline-neutral"> </span>
|
|
223
223
|
<span class="cline-any cline-neutral"> </span>
|
|
224
224
|
<span class="cline-any cline-neutral"> </span>
|
|
225
|
-
<span class="cline-any cline-
|
|
225
|
+
<span class="cline-any cline-yes">40x</span>
|
|
226
226
|
<span class="cline-any cline-neutral"> </span>
|
|
227
227
|
<span class="cline-any cline-neutral"> </span>
|
|
228
228
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -234,11 +234,11 @@
|
|
|
234
234
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useEffect, useRef, useCallback, useState } from "react";
|
|
235
235
|
import useMap, { useMapType } from "./useMap";
|
|
236
236
|
import MapLibreGlWrapper from "../components/MapLibreMap/lib/MapLibreGlWrapper";
|
|
237
|
-
import { SourceSpecification } from "maplibre-gl";
|
|
237
|
+
import { Source, SourceSpecification } from "maplibre-gl";
|
|
238
238
|
|
|
239
239
|
type useSourceType = {
|
|
240
240
|
map: MapLibreGlWrapper | undefined;
|
|
241
|
-
source:
|
|
241
|
+
source: Source | undefined;
|
|
242
242
|
componentId: string;
|
|
243
243
|
mapHook: useMapType;
|
|
244
244
|
};
|
|
@@ -249,39 +249,39 @@ interface useSourceProps {
|
|
|
249
249
|
sourceId: string;
|
|
250
250
|
}
|
|
251
251
|
|
|
252
|
-
function
|
|
253
|
-
const mapHook =
|
|
252
|
+
function useSource(props: useSourceProps): useSourceType {
|
|
253
|
+
const mapHook = useMap({
|
|
254
254
|
mapId: props.mapId,
|
|
255
255
|
});
|
|
256
256
|
|
|
257
|
-
const initializedRef =
|
|
258
|
-
const [source, setSource] =
|
|
259
|
-
const sourceId =
|
|
260
|
-
props.sourceId || (props.idPrefix ? props.idPrefix : "Source-") + mapHook.componentId
|
|
257
|
+
const initializedRef = useRef<boolean>(false);
|
|
258
|
+
const [source, setSource] = useState<Source>();
|
|
259
|
+
const sourceId = useRef(
|
|
260
|
+
props.sourceId || <span class="branch-1 cbranch-no" title="branch not covered" >(props.idPrefix ? props.idPrefix : "Source-") + mapHook.componentId</span>
|
|
261
261
|
);
|
|
262
262
|
|
|
263
|
-
const createSource =
|
|
264
|
-
<span class="
|
|
265
|
-
|
|
263
|
+
const createSource = useCallback(() => {
|
|
264
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span>
|
|
265
|
+
initializedRef.current = true;
|
|
266
266
|
|
|
267
|
-
<span class="
|
|
267
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (mapHook.map.map.getSource(sourceId.current)) {
|
|
268
268
|
<span class="cstat-no" title="statement not covered" > mapHook.cleanup();</span>
|
|
269
269
|
}
|
|
270
270
|
|
|
271
|
-
|
|
271
|
+
mapHook.map?.addSource(sourceId.current, {
|
|
272
272
|
...props.source,
|
|
273
|
-
});
|
|
273
|
+
}, mapHook.componentId);
|
|
274
274
|
|
|
275
|
-
|
|
275
|
+
setSource(mapHook.map.map.getSource(sourceId.current));
|
|
276
276
|
}, [props, mapHook.map]);
|
|
277
277
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
278
|
+
useEffect(() => {
|
|
279
|
+
if (!mapHook.map || initializedRef.current) return;
|
|
280
|
+
createSource();
|
|
281
281
|
}, [mapHook.map, props, createSource]);
|
|
282
282
|
|
|
283
|
-
|
|
284
|
-
<span class="
|
|
283
|
+
useEffect(() => {
|
|
284
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (!initializedRef.current || <span class="branch-1 cbranch-no" title="branch not covered" >!mapHook.map?.map?.getSource(props.sourceId))</span> return;
|
|
285
285
|
|
|
286
286
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
287
287
|
//@ts-ignore setData only exists on GeoJsonSource
|
|
@@ -291,11 +291,11 @@ function <span class="fstat-no" title="function not covered" >useSource(</span>p
|
|
|
291
291
|
}, [props.source?.data]);
|
|
292
292
|
|
|
293
293
|
//cleanup
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
294
|
+
useEffect(() => {
|
|
295
|
+
return () => {
|
|
296
|
+
initializedRef.current = false;
|
|
297
|
+
if (mapHook.map) {
|
|
298
|
+
for (const [layerId, layer] of Object.entries(mapHook.map.map.style._layers)) {
|
|
299
299
|
<span class="cstat-no" title="statement not covered" > if (layer.source === sourceId.current) {</span>
|
|
300
300
|
<span class="cstat-no" title="statement not covered" > mapHook.map.map.removeLayer(layerId);</span>
|
|
301
301
|
}
|
|
@@ -306,7 +306,7 @@ function <span class="fstat-no" title="function not covered" >useSource(</span>p
|
|
|
306
306
|
};
|
|
307
307
|
}, [mapHook.map]);
|
|
308
308
|
|
|
309
|
-
|
|
309
|
+
return {
|
|
310
310
|
map: mapHook.map,
|
|
311
311
|
source: source,
|
|
312
312
|
componentId: mapHook.componentId,
|
|
@@ -322,7 +322,7 @@ export default useSource;
|
|
|
322
322
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
323
323
|
Code coverage generated by
|
|
324
324
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
325
|
-
at
|
|
325
|
+
at 2023-01-23T12:27:40.277Z
|
|
326
326
|
</div>
|
|
327
327
|
<script src="../../prettify.js"></script>
|
|
328
328
|
<script>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for src/hooks/useWms.
|
|
6
|
+
<title>Code coverage report for src/hooks/useWms.ts</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
8
|
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
9
|
<link rel="stylesheet" href="../../base.css" />
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/hooks</a> useWms.
|
|
22
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/hooks</a> useWms.ts</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
@@ -154,7 +154,33 @@
|
|
|
154
154
|
<a name='L89'></a><a href='#L89'>89</a>
|
|
155
155
|
<a name='L90'></a><a href='#L90'>90</a>
|
|
156
156
|
<a name='L91'></a><a href='#L91'>91</a>
|
|
157
|
-
<a name='L92'></a><a href='#L92'>92</a
|
|
157
|
+
<a name='L92'></a><a href='#L92'>92</a>
|
|
158
|
+
<a name='L93'></a><a href='#L93'>93</a>
|
|
159
|
+
<a name='L94'></a><a href='#L94'>94</a>
|
|
160
|
+
<a name='L95'></a><a href='#L95'>95</a>
|
|
161
|
+
<a name='L96'></a><a href='#L96'>96</a>
|
|
162
|
+
<a name='L97'></a><a href='#L97'>97</a>
|
|
163
|
+
<a name='L98'></a><a href='#L98'>98</a>
|
|
164
|
+
<a name='L99'></a><a href='#L99'>99</a>
|
|
165
|
+
<a name='L100'></a><a href='#L100'>100</a>
|
|
166
|
+
<a name='L101'></a><a href='#L101'>101</a>
|
|
167
|
+
<a name='L102'></a><a href='#L102'>102</a>
|
|
168
|
+
<a name='L103'></a><a href='#L103'>103</a>
|
|
169
|
+
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
|
+
<a name='L105'></a><a href='#L105'>105</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
171
|
+
<span class="cline-any cline-neutral"> </span>
|
|
172
|
+
<span class="cline-any cline-neutral"> </span>
|
|
173
|
+
<span class="cline-any cline-neutral"> </span>
|
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
|
175
|
+
<span class="cline-any cline-neutral"> </span>
|
|
176
|
+
<span class="cline-any cline-neutral"> </span>
|
|
177
|
+
<span class="cline-any cline-neutral"> </span>
|
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
|
+
<span class="cline-any cline-neutral"> </span>
|
|
158
184
|
<span class="cline-any cline-neutral"> </span>
|
|
159
185
|
<span class="cline-any cline-neutral"> </span>
|
|
160
186
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -246,15 +272,28 @@
|
|
|
246
272
|
<span class="cline-any cline-neutral"> </span>
|
|
247
273
|
<span class="cline-any cline-neutral"> </span>
|
|
248
274
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useState, useEffect } from "react";
|
|
249
|
-
import WMSCapabilities from "wms-capabilities";
|
|
275
|
+
import WMSCapabilities, { WMSCapabilitiesJSON } from "wms-capabilities";
|
|
276
|
+
|
|
277
|
+
export interface useWmsProps{
|
|
278
|
+
url?:string;
|
|
279
|
+
urlParameters?:{[key: string]: string};
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
export interface useWmsReturnType{
|
|
283
|
+
capabilities:WMSCapabilitiesJSON | null | undefined;
|
|
284
|
+
getFeatureInfoUrl:string | undefined;
|
|
285
|
+
wmsUrl:string | undefined;
|
|
286
|
+
error:string | undefined;
|
|
287
|
+
setUrl:(value:string|undefined) => void;
|
|
288
|
+
}
|
|
250
289
|
|
|
251
|
-
function <span class="fstat-no" title="function not covered" >useWms(</span>props) {
|
|
290
|
+
function <span class="fstat-no" title="function not covered" >useWms(</span>props:useWmsProps):useWmsReturnType {
|
|
252
291
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
253
|
-
const [getFeatureInfoUrl, setGetFeatureInfoUrl] = <span class="cstat-no" title="statement not covered" >useState(
|
|
292
|
+
const [getFeatureInfoUrl, setGetFeatureInfoUrl] = <span class="cstat-no" title="statement not covered" >useState<string>();</span>
|
|
254
293
|
const [url, setUrl] = <span class="cstat-no" title="statement not covered" >useState(props.url);</span>
|
|
255
294
|
const [wmsUrl, setWmsUrl] = <span class="cstat-no" title="statement not covered" >useState("");</span>
|
|
256
|
-
const [capabilities, setCapabilities] = <span class="cstat-no" title="statement not covered" >useState(
|
|
257
|
-
const [error, setError] = <span class="cstat-no" title="statement not covered" >useState(
|
|
295
|
+
const [capabilities, setCapabilities] = <span class="cstat-no" title="statement not covered" >useState<WMSCapabilitiesJSON | null | undefined>();</span>
|
|
296
|
+
const [error, setError] = <span class="cstat-no" title="statement not covered" >useState();</span>
|
|
258
297
|
|
|
259
298
|
const clearState = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
260
299
|
<span class="cstat-no" title="statement not covered" > setGetFeatureInfoUrl(undefined);</span>
|
|
@@ -276,16 +315,16 @@ function <span class="fstat-no" title="function not covered" >useWms(</span>prop
|
|
|
276
315
|
<span class="cstat-no" title="statement not covered" > _propsUrlParams = url.split("?");</span>
|
|
277
316
|
<span class="cstat-no" title="statement not covered" > _wmsUrl = _propsUrlParams[0];</span>
|
|
278
317
|
}
|
|
279
|
-
|
|
318
|
+
const _urlParamsFromUrl = <span class="cstat-no" title="statement not covered" >new URLSearchParams(_propsUrlParams?.[1]);</span>
|
|
280
319
|
|
|
281
|
-
|
|
320
|
+
const urlParamsObj = <span class="cstat-no" title="statement not covered" >{</span>
|
|
282
321
|
...Object.fromEntries(_urlParamsFromUrl),
|
|
283
322
|
...props.urlParameters,
|
|
284
323
|
};
|
|
285
324
|
// create URLSearchParams object to assemble the URL Parameters
|
|
286
|
-
|
|
325
|
+
const urlParams = <span class="cstat-no" title="statement not covered" >new URLSearchParams(urlParamsObj);</span>
|
|
287
326
|
|
|
288
|
-
|
|
327
|
+
const urlParamsStr =
|
|
289
328
|
<span class="cstat-no" title="statement not covered" > decodeURIComponent(urlParams.toString()) + "".replace(/%2F/g, "/").replace(/%3A/g, ":");</span>
|
|
290
329
|
|
|
291
330
|
<span class="cstat-no" title="statement not covered" > fetch(_wmsUrl + "?" + urlParamsStr)</span>
|
|
@@ -296,8 +335,8 @@ function <span class="fstat-no" title="function not covered" >useWms(</span>prop
|
|
|
296
335
|
<span class="cstat-no" title="statement not covered" > return res.text();</span>
|
|
297
336
|
}
|
|
298
337
|
})
|
|
299
|
-
.then(<span class="fstat-no" title="function not covered" >(d</span>ata) => {
|
|
300
|
-
<span class="cstat-no" title="statement not covered" > setCapabilities(new WMSCapabilities(data).toJSON());</span>
|
|
338
|
+
.then(<span class="fstat-no" title="function not covered" >(d</span>ata:string) => {
|
|
339
|
+
<span class="cstat-no" title="statement not covered" > setCapabilities(new WMSCapabilities(data, window.DOMParser).toJSON());</span>
|
|
301
340
|
})
|
|
302
341
|
.catch(<span class="fstat-no" title="function not covered" >(e</span>rror) => {
|
|
303
342
|
//reset local state
|
|
@@ -343,7 +382,7 @@ export default useWms;
|
|
|
343
382
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
344
383
|
Code coverage generated by
|
|
345
384
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
346
|
-
at
|
|
385
|
+
at 2023-01-23T12:27:40.277Z
|
|
347
386
|
</div>
|
|
348
387
|
<script src="../../prettify.js"></script>
|
|
349
388
|
<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
|
|
104
|
+
at 2023-01-23T12:27:40.277Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -177,11 +177,11 @@ export { default as MlLayerSwipe } from "./components/MlLayerSwipe/MlLayerSwipe"
|
|
|
177
177
|
export { default as MlTransitionGeoJsonLayer } from "./components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer";
|
|
178
178
|
export { default as MlMarker } from "./components/MlMarker/MlMarker";
|
|
179
179
|
|
|
180
|
-
export { default as
|
|
181
|
-
export { default as GeoJsonProvider } from "./components/
|
|
182
|
-
export { default as GeoJsonContext } from "./components/
|
|
180
|
+
export { default as MlGpxViewer } from "./components/MlGpxViewer/MlGpxViewer";
|
|
181
|
+
export { default as GeoJsonProvider } from "./components/MlGpxViewer/util/GeoJsonProvider";
|
|
182
|
+
export { default as GeoJsonContext } from "./components/MlGpxViewer/util/GeoJsonContext";
|
|
183
183
|
|
|
184
|
-
export { default as MlSpatialElevationProfile } from "./components/MlSpatialElevationProfile/MlSpatialElevationProfile
|
|
184
|
+
export { default as MlSpatialElevationProfile } from "./components/MlSpatialElevationProfile/MlSpatialElevationProfile";
|
|
185
185
|
|
|
186
186
|
export { default as MlOsmLayer } from "./components/MlOsmLayer/MlOsmLayer.js";
|
|
187
187
|
export { default as MlBasicComponent } from "./components/MlBasicComponent.js";
|
|
@@ -189,7 +189,7 @@ export { default as MlBasicComponent } from "./components/MlBasicComponent.js";
|
|
|
189
189
|
export { default as useLayer } from "./hooks/useLayer";
|
|
190
190
|
export { default as useMapState } from "./hooks/useMapState";
|
|
191
191
|
export { default as useMap } from "./hooks/useMap";
|
|
192
|
-
export { default as useWms } from "./hooks/useWms
|
|
192
|
+
export { default as useWms } from "./hooks/useWms";
|
|
193
193
|
export { default as useSource } from "./hooks/useSource";
|
|
194
194
|
export { default as useExportMap } from "./hooks/useExportMap";
|
|
195
195
|
export { default as useCameraFollowPath } from "./hooks/useCameraFollowPath/useCameraFollowPath";
|
|
@@ -205,7 +205,7 @@ export { default as SimpleDataContext } from "./contexts/SimpleDataContext";
|
|
|
205
205
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
206
206
|
Code coverage generated by
|
|
207
207
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
208
|
-
at
|
|
208
|
+
at 2023-01-23T12:27:40.277Z
|
|
209
209
|
</div>
|
|
210
210
|
<script src="../prettify.js"></script>
|
|
211
211
|
<script>
|