@mapcomponents/react-maplibre 0.1.62 → 0.1.64
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/.babelrc +21 -2
- package/.editorconfig +1 -1
- package/.eslintrc.js +11 -1
- package/.github/workflows/check-catalogue-metadata-schema.yml +19 -0
- package/.storybook/main.js +0 -1
- package/.storybook/preview.js +0 -2
- package/CHANGELOG.md +43 -0
- package/coverage/clover.xml +864 -1037
- package/coverage/coverage-final.json +32 -21
- package/coverage/lcov-report/favicon.png +0 -0
- package/coverage/lcov-report/index.html +170 -95
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- 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 +148 -0
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/index.html +22 -7
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +72 -42
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +15 -15
- 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 +86 -35
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/{MlSpatialElevationProfile/MlSpatialElevationProfile.js.html → MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html} +215 -320
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +649 -0
- 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 +161 -0
- 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 +394 -0
- package/coverage/lcov-report/src/components/MlGpxViewer/index.html +116 -0
- 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 +214 -0
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +121 -0
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +412 -0
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +463 -0
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +161 -0
- package/coverage/lcov-report/src/components/{MlGPXViewer/MlGPXViewer.tsx.html → MlSketchTool/MlSketchTool.tsx.html} +271 -589
- package/coverage/lcov-report/src/components/{MlGPXViewer → MlSketchTool}/index.html +22 -37
- 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/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 +1724 -1974
- package/cypress/support/commands.ts +37 -0
- package/cypress/support/component-index.html +12 -0
- package/cypress/support/component.ts +46 -0
- package/cypress.config.ts +101 -0
- package/dist/components/MapLibreMap/MapLibreMap.d.ts +1 -1
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +53 -27
- 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/MlCreatePdfForm/MlCreatePdfForm.cy.d.ts +1 -0
- package/dist/components/MlCreatePdfForm/lib/PdfPreview.d.ts +1 -1
- package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +10 -4
- package/dist/components/MlFeatureEditor/lib/double_click_zoom.d.ts +0 -2
- package/dist/components/MlFeatureEditor/lib/theme.d.ts +1 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +23 -12
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +12 -11
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +2 -0
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +2 -0
- 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/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/LayerList/ColorPicker.d.ts +9 -0
- package/dist/components/MlSketchTool/LayerList/LayerList.d.ts +5 -0
- package/dist/components/MlSketchTool/LayerList/LayerListItem.d.ts +11 -0
- package/dist/components/MlSketchTool/LayerList/LayerPropertyForm.d.ts +9 -0
- package/dist/components/MlSketchTool/MlSketchTool.d.ts +29 -0
- package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +10 -0
- 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/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +3 -67
- 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/contexts/SimpleDataProvider.d.ts +1 -1
- package/dist/custom.d.d.ts +1 -1
- 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 +14 -8
- 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 +2 -2
- package/dist/hooks/useMap.test.d.ts +1 -0
- package/dist/hooks/useMapState.d.ts +3 -3
- package/dist/hooks/useSource.d.ts +3 -3
- package/dist/hooks/useWms.d.ts +24 -16
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.css +1 -1
- package/dist/index.esm.js +9327 -14844
- 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 +10 -1
- package/dist/ui_components/Tooltip.d.ts +1 -1
- package/dist/ui_components/TopToolbar.d.ts +7 -1
- 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 -185
- package/public/assets/sample1.gpx +3003 -0
- package/public/assets/sample2.gpx +1264 -0
- package/public/assets/sample3.gpx +912 -0
- package/{src/components/MlImageMarkerLayer → public}/assets/wg-marker.png +0 -0
- package/public/index.html +0 -4
- package/public/thumbnails/MlSketchTool.png +0 -0
- package/public/thumbnails/useCameraFollowPath.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.cy.tsx +21 -0
- package/src/components/MlCreatePdfForm/MlCreatePdfForm.meta.json +1 -2
- package/src/components/MlCreatePdfForm/MlCreatePdfForm.stories.tsx +1 -3
- package/src/components/MlCreatePdfForm/lib/PdfForm.tsx +25 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +2 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +39 -29
- 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 +191 -0
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +47 -30
- package/src/components/MlGeoJsonLayer/assets/earthquake.json +109937 -0
- package/src/components/MlGeoJsonLayer/assets/sample_1.json +138 -24
- package/src/components/MlGeoJsonLayer/assets/sample_2.json +140 -20
- package/src/components/MlGeoJsonLayer/assets/wg_locations.json +65 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js +189 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js +188 -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/{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 +68 -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/LayerList/ColorPicker.tsx +43 -0
- package/src/components/MlSketchTool/LayerList/LayerList.tsx +12 -0
- package/src/components/MlSketchTool/LayerList/LayerListItem.tsx +109 -0
- package/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx +126 -0
- package/src/components/MlSketchTool/MlSketchTool.doc.de.md +3 -0
- package/src/components/MlSketchTool/MlSketchTool.meta.json +14 -0
- package/src/components/MlSketchTool/MlSketchTool.stories.js +26 -0
- package/src/components/MlSketchTool/MlSketchTool.tsx +271 -0
- 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/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.meta.json +3 -4
- 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/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/MlCenterPosition/MlCenterPosition.stories.js → hooks/useGpx/useGpx.stories.js} +4 -5
- package/src/hooks/useGpx/useGpx.tsx +70 -0
- package/src/hooks/useLayer.ts +32 -10
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.doc.de.md +3 -0
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.meta_.json +15 -0
- package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.js +20 -0
- 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 +82 -0
- package/src/ui_components/Tooltip.tsx +17 -0
- package/src/ui_components/TopToolbar.tsx +26 -0
- 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 +39 -58
- package/config/getHttpsConfig.js +0 -66
- package/config/modules.js +0 -134
- package/config/pnpTs.js +0 -35
- package/config/webpack.config.js +0 -757
- package/config/webpackDevServer.config.js +0 -130
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +0 -1645
- package/scripts/start.js +0 -166
- package/src/components/MlGPXViewer/MlGPXViewer.stories.js +0 -31
- package/src/components/MlGPXViewer/MlGPXViewer.test.js +0 -28
- package/src/components/MlGPXViewer/MlGPXViewer.tsx +0 -377
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.js +0 -66
- 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/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/Sidebar.js +0 -100
- package/src/ui_components/Tooltip.js +0 -21
- package/src/ui_components/TopToolbar.js +0 -29
|
@@ -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">87.09% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>31
|
|
28
|
+
<span class='fraction'>27/31</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">60% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>12/
|
|
35
|
+
<span class='fraction'>12/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">100% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>27/27</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 high'></div>
|
|
65
65
|
<div class="pad1">
|
|
66
66
|
<table class="coverage-summary">
|
|
67
67
|
<thead>
|
|
@@ -79,18 +79,18 @@
|
|
|
79
79
|
</tr>
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
|
-
<td class="file
|
|
83
|
-
<td data-value="
|
|
84
|
-
<div class="chart"><div class="cover-fill" style="width:
|
|
82
|
+
<td class="file high" data-value="MlSpatialElevationProfile.tsx"><a href="MlSpatialElevationProfile.tsx.html">MlSpatialElevationProfile.tsx</a></td>
|
|
83
|
+
<td data-value="87.09" class="pic high">
|
|
84
|
+
<div class="chart"><div class="cover-fill" style="width: 87%"></div><div class="cover-empty" style="width: 13%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="
|
|
87
|
-
<td data-value="
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="
|
|
90
|
-
<td data-value="
|
|
91
|
-
<td data-value="
|
|
92
|
-
<td data-value="
|
|
93
|
-
<td data-value="
|
|
86
|
+
<td data-value="87.09" class="pct high">87.09%</td>
|
|
87
|
+
<td data-value="31" class="abs high">27/31</td>
|
|
88
|
+
<td data-value="60" class="pct medium">60%</td>
|
|
89
|
+
<td data-value="20" class="abs medium">12/20</td>
|
|
90
|
+
<td data-value="100" class="pct high">100%</td>
|
|
91
|
+
<td data-value="6" class="abs high">6/6</td>
|
|
92
|
+
<td data-value="100" class="pct high">100%</td>
|
|
93
|
+
<td data-value="27" class="abs high">27/27</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
|
|
104
|
+
at 2023-01-15T17:55:43.336Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -688,7 +688,7 @@ export default MlThreeJsLayer;</pre></td></tr></table></pre>
|
|
|
688
688
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
689
689
|
Code coverage generated by
|
|
690
690
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
691
|
-
at
|
|
691
|
+
at 2023-01-15T17:55:43.336Z
|
|
692
692
|
</div>
|
|
693
693
|
<script src="../../../prettify.js"></script>
|
|
694
694
|
<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-15T17:55:43.336Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -170,72 +170,7 @@
|
|
|
170
170
|
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
171
|
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
172
|
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
-
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
-
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
-
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
-
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
-
<a name='L112'></a><a href='#L112'>112</a>
|
|
178
|
-
<a name='L113'></a><a href='#L113'>113</a>
|
|
179
|
-
<a name='L114'></a><a href='#L114'>114</a>
|
|
180
|
-
<a name='L115'></a><a href='#L115'>115</a>
|
|
181
|
-
<a name='L116'></a><a href='#L116'>116</a>
|
|
182
|
-
<a name='L117'></a><a href='#L117'>117</a>
|
|
183
|
-
<a name='L118'></a><a href='#L118'>118</a>
|
|
184
|
-
<a name='L119'></a><a href='#L119'>119</a>
|
|
185
|
-
<a name='L120'></a><a href='#L120'>120</a>
|
|
186
|
-
<a name='L121'></a><a href='#L121'>121</a>
|
|
187
|
-
<a name='L122'></a><a href='#L122'>122</a>
|
|
188
|
-
<a name='L123'></a><a href='#L123'>123</a>
|
|
189
|
-
<a name='L124'></a><a href='#L124'>124</a>
|
|
190
|
-
<a name='L125'></a><a href='#L125'>125</a>
|
|
191
|
-
<a name='L126'></a><a href='#L126'>126</a>
|
|
192
|
-
<a name='L127'></a><a href='#L127'>127</a>
|
|
193
|
-
<a name='L128'></a><a href='#L128'>128</a>
|
|
194
|
-
<a name='L129'></a><a href='#L129'>129</a>
|
|
195
|
-
<a name='L130'></a><a href='#L130'>130</a>
|
|
196
|
-
<a name='L131'></a><a href='#L131'>131</a>
|
|
197
|
-
<a name='L132'></a><a href='#L132'>132</a>
|
|
198
|
-
<a name='L133'></a><a href='#L133'>133</a>
|
|
199
|
-
<a name='L134'></a><a href='#L134'>134</a>
|
|
200
|
-
<a name='L135'></a><a href='#L135'>135</a>
|
|
201
|
-
<a name='L136'></a><a href='#L136'>136</a>
|
|
202
|
-
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
|
-
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
|
-
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
-
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
-
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
-
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
-
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
-
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
-
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
-
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
-
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
|
-
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
|
-
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
|
-
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
-
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
-
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
|
-
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
|
-
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
-
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
-
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
-
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
-
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
-
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
-
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
-
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
-
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
-
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
-
<a name='L164'></a><a href='#L164'>164</a>
|
|
230
|
-
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
-
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
-
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
-
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
-
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
-
<a name='L170'></a><a href='#L170'>170</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
236
|
-
<span class="cline-any cline-neutral"> </span>
|
|
237
|
-
<span class="cline-any cline-neutral"> </span>
|
|
238
|
-
<span class="cline-any cline-neutral"> </span>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
239
174
|
<span class="cline-any cline-neutral"> </span>
|
|
240
175
|
<span class="cline-any cline-neutral"> </span>
|
|
241
176
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -252,66 +187,9 @@
|
|
|
252
187
|
<span class="cline-any cline-neutral"> </span>
|
|
253
188
|
<span class="cline-any cline-neutral"> </span>
|
|
254
189
|
<span class="cline-any cline-neutral"> </span>
|
|
190
|
+
<span class="cline-any cline-yes">10x</span>
|
|
255
191
|
<span class="cline-any cline-neutral"> </span>
|
|
256
192
|
<span class="cline-any cline-neutral"> </span>
|
|
257
|
-
<span class="cline-any cline-neutral"> </span>
|
|
258
|
-
<span class="cline-any cline-neutral"> </span>
|
|
259
|
-
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-neutral"> </span>
|
|
261
|
-
<span class="cline-any cline-neutral"> </span>
|
|
262
|
-
<span class="cline-any cline-neutral"> </span>
|
|
263
|
-
<span class="cline-any cline-neutral"> </span>
|
|
264
|
-
<span class="cline-any cline-neutral"> </span>
|
|
265
|
-
<span class="cline-any cline-neutral"> </span>
|
|
266
|
-
<span class="cline-any cline-neutral"> </span>
|
|
267
|
-
<span class="cline-any cline-neutral"> </span>
|
|
268
|
-
<span class="cline-any cline-neutral"> </span>
|
|
269
|
-
<span class="cline-any cline-neutral"> </span>
|
|
270
|
-
<span class="cline-any cline-neutral"> </span>
|
|
271
|
-
<span class="cline-any cline-neutral"> </span>
|
|
272
|
-
<span class="cline-any cline-neutral"> </span>
|
|
273
|
-
<span class="cline-any cline-neutral"> </span>
|
|
274
|
-
<span class="cline-any cline-neutral"> </span>
|
|
275
|
-
<span class="cline-any cline-neutral"> </span>
|
|
276
|
-
<span class="cline-any cline-neutral"> </span>
|
|
277
|
-
<span class="cline-any cline-neutral"> </span>
|
|
278
|
-
<span class="cline-any cline-neutral"> </span>
|
|
279
|
-
<span class="cline-any cline-neutral"> </span>
|
|
280
|
-
<span class="cline-any cline-neutral"> </span>
|
|
281
|
-
<span class="cline-any cline-neutral"> </span>
|
|
282
|
-
<span class="cline-any cline-neutral"> </span>
|
|
283
|
-
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-neutral"> </span>
|
|
285
|
-
<span class="cline-any cline-neutral"> </span>
|
|
286
|
-
<span class="cline-any cline-neutral"> </span>
|
|
287
|
-
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-neutral"> </span>
|
|
289
|
-
<span class="cline-any cline-neutral"> </span>
|
|
290
|
-
<span class="cline-any cline-neutral"> </span>
|
|
291
|
-
<span class="cline-any cline-neutral"> </span>
|
|
292
|
-
<span class="cline-any cline-neutral"> </span>
|
|
293
|
-
<span class="cline-any cline-neutral"> </span>
|
|
294
|
-
<span class="cline-any cline-neutral"> </span>
|
|
295
|
-
<span class="cline-any cline-neutral"> </span>
|
|
296
|
-
<span class="cline-any cline-neutral"> </span>
|
|
297
|
-
<span class="cline-any cline-neutral"> </span>
|
|
298
|
-
<span class="cline-any cline-neutral"> </span>
|
|
299
|
-
<span class="cline-any cline-neutral"> </span>
|
|
300
|
-
<span class="cline-any cline-neutral"> </span>
|
|
301
|
-
<span class="cline-any cline-neutral"> </span>
|
|
302
|
-
<span class="cline-any cline-neutral"> </span>
|
|
303
|
-
<span class="cline-any cline-neutral"> </span>
|
|
304
|
-
<span class="cline-any cline-neutral"> </span>
|
|
305
|
-
<span class="cline-any cline-neutral"> </span>
|
|
306
|
-
<span class="cline-any cline-neutral"> </span>
|
|
307
|
-
<span class="cline-any cline-neutral"> </span>
|
|
308
|
-
<span class="cline-any cline-neutral"> </span>
|
|
309
|
-
<span class="cline-any cline-neutral"> </span>
|
|
310
|
-
<span class="cline-any cline-neutral"> </span>
|
|
311
|
-
<span class="cline-any cline-neutral"> </span>
|
|
312
|
-
<span class="cline-any cline-neutral"> </span>
|
|
313
|
-
<span class="cline-any cline-neutral"> </span>
|
|
314
|
-
<span class="cline-any cline-yes">10x</span>
|
|
315
193
|
<span class="cline-any cline-yes">12x</span>
|
|
316
194
|
<span class="cline-any cline-neutral"> </span>
|
|
317
195
|
<span class="cline-any cline-yes">12x</span>
|
|
@@ -329,8 +207,6 @@
|
|
|
329
207
|
<span class="cline-any cline-yes">12x</span>
|
|
330
208
|
<span class="cline-any cline-yes">12x</span>
|
|
331
209
|
<span class="cline-any cline-neutral"> </span>
|
|
332
|
-
<span class="cline-any cline-neutral"> </span>
|
|
333
|
-
<span class="cline-any cline-neutral"> </span>
|
|
334
210
|
<span class="cline-any cline-yes">12x</span>
|
|
335
211
|
<span class="cline-any cline-yes">4x</span>
|
|
336
212
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -401,86 +277,26 @@
|
|
|
401
277
|
<span class="cline-any cline-neutral"> </span>
|
|
402
278
|
<span class="cline-any cline-neutral"> </span>
|
|
403
279
|
<span class="cline-any cline-neutral"> </span>
|
|
404
|
-
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useRef, useEffect, useCallback } from
|
|
405
|
-
|
|
406
|
-
import
|
|
407
|
-
|
|
408
|
-
import
|
|
409
|
-
|
|
410
|
-
import {
|
|
411
|
-
import MlGeoJsonLayer from "../MlGeoJsonLayer/MlGeoJsonLayer";
|
|
412
|
-
import { Feature, FeatureCollection } from "@turf/turf";
|
|
413
|
-
import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification, MapLayerMouseEvent } from "maplibre-gl";
|
|
280
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
281
|
+
import * as turf from '@turf/turf';
|
|
282
|
+
import useMap from '../../hooks/useMap';
|
|
283
|
+
import { _transitionToGeojson } from './util/transitionFunctions';
|
|
284
|
+
import MlGeoJsonLayer from '../MlGeoJsonLayer/MlGeoJsonLayer';
|
|
285
|
+
import { Feature, FeatureCollection } from '@turf/turf';
|
|
286
|
+
import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
|
|
414
287
|
|
|
415
288
|
const msPerStep = 50;
|
|
416
289
|
|
|
417
|
-
|
|
418
|
-
/**
|
|
419
|
-
* Id of the target MapLibre instance in mapContext
|
|
420
|
-
*/
|
|
421
|
-
mapId: string;
|
|
422
|
-
/**
|
|
423
|
-
* GeoJSON data that is supposed to be rendered by this component.
|
|
424
|
-
*/
|
|
425
|
-
geojson: Feature | FeatureCollection | undefined;
|
|
426
|
-
/**
|
|
427
|
-
* Type of the layer that will be added to the MapLibre instance.
|
|
428
|
-
* Possible values: "line", "circle", "fill"
|
|
429
|
-
*/
|
|
430
|
-
type?: "fill" | "line" | "circle";
|
|
431
|
-
/**
|
|
432
|
-
* Paint property object, that is passed to the addLayer call.
|
|
433
|
-
* Possible props depend on the layer type.
|
|
434
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
435
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
436
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
437
|
-
*/
|
|
438
|
-
paint?: CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
439
|
-
/**
|
|
440
|
-
* Layout property object, that is passed to the addLayer call.
|
|
441
|
-
* Possible props depend on the layer type.
|
|
442
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
443
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
444
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
445
|
-
*/
|
|
446
|
-
layout?: CircleLayerSpecification['layout'] | FillLayerSpecification['layout'] | LineLayerSpecification['layout'];
|
|
447
|
-
/**
|
|
448
|
-
* Javascript object that is spread into the addLayer commands first parameter.
|
|
449
|
-
*/
|
|
450
|
-
options?: CircleLayerSpecification | FillLayerSpecification | LineLayerSpecification;
|
|
451
|
-
/**
|
|
452
|
-
* Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
|
|
453
|
-
*/
|
|
454
|
-
defaultPaintOverrides?: { circle?: CircleLayerSpecification['paint'], fill?: FillLayerSpecification['paint'], line?: LineLayerSpecification['paint'] };
|
|
455
|
-
/**
|
|
456
|
-
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
457
|
-
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
458
|
-
*/
|
|
459
|
-
insertBeforeLayer: string;
|
|
460
|
-
/**
|
|
461
|
-
* Hover event handler that is executed whenever a geometry rendered by this component is hovered.
|
|
462
|
-
*/
|
|
463
|
-
onHover?: MapLayerMouseEvent;
|
|
464
|
-
/**
|
|
465
|
-
* Click event handler that is executed whenever a geometry rendered by this component is clicked.
|
|
466
|
-
*/
|
|
467
|
-
onClick?: MapLayerMouseEvent;
|
|
468
|
-
/**
|
|
469
|
-
* Leave event handler that is executed whenever a geometry rendered by this component is
|
|
470
|
-
* left/unhovered.
|
|
471
|
-
*/
|
|
472
|
-
onLeave?: MapLayerMouseEvent;
|
|
473
|
-
/**
|
|
474
|
-
* Creates transition animation whenever the geojson prop changes.
|
|
475
|
-
* Only works with layer type "line" and LineString GeoJSON data.
|
|
476
|
-
*/
|
|
290
|
+
type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
|
|
477
291
|
transitionTime: number;
|
|
478
|
-
}
|
|
292
|
+
};
|
|
479
293
|
|
|
480
294
|
/**
|
|
481
295
|
* Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
|
|
482
296
|
*/
|
|
483
297
|
const MlTransitionGeoJsonLayer = (props: MlTransitionGeoJsonLayerProps) => {
|
|
298
|
+
// ignore eslint. Only using `geojson` for destructuring
|
|
299
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
484
300
|
const { geojson, ...restProps } = props;
|
|
485
301
|
|
|
486
302
|
const mapHook = useMap({
|
|
@@ -496,9 +312,7 @@ const MlTransitionGeoJsonLayer = (props: MlTransitionGeoJsonLayerProps) => {
|
|
|
496
312
|
const currentTransitionStepRef = useRef(false);
|
|
497
313
|
const transitionGeojsonDataRef = useRef([]);
|
|
498
314
|
const transitionGeojsonCommonDataRef = useRef([]);
|
|
499
|
-
const [displayGeojson, setDisplayGeojson] = useState(
|
|
500
|
-
turf.featureCollection([])
|
|
501
|
-
);
|
|
315
|
+
const [displayGeojson, setDisplayGeojson] = useState(turf.featureCollection([]));
|
|
502
316
|
|
|
503
317
|
useEffect(() => {
|
|
504
318
|
return () => {
|
|
@@ -528,8 +342,8 @@ const MlTransitionGeoJsonLayer = (props: MlTransitionGeoJsonLayerProps) => {
|
|
|
528
342
|
<span class="missing-if-branch" title="else path not taken" >E</span>if (!mapHook.map || !initializedRef.current) return;
|
|
529
343
|
|
|
530
344
|
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
531
|
-
typeof props.transitionTime !==
|
|
532
|
-
props.type ===
|
|
345
|
+
typeof props.transitionTime !== 'undefined' &&
|
|
346
|
+
props.type === 'line' &&
|
|
533
347
|
oldGeojsonRef.current
|
|
534
348
|
) {
|
|
535
349
|
<span class="cstat-no" title="statement not covered" > transitionInProgressRef.current = false;</span>
|
|
@@ -543,10 +357,10 @@ const MlTransitionGeoJsonLayer = (props: MlTransitionGeoJsonLayerProps) => {
|
|
|
543
357
|
|
|
544
358
|
const startTransition = useCallback(() => {
|
|
545
359
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (
|
|
546
|
-
props.type ===
|
|
547
|
-
typeof props.transitionTime !==
|
|
360
|
+
props.type === 'line' &&
|
|
361
|
+
typeof props.transitionTime !== 'undefined' &&
|
|
548
362
|
<span class="branch-2 cbranch-no" title="branch not covered" > props.transitionTime </span>&&
|
|
549
|
-
<span class="branch-3 cbranch-no" title="branch not covered" > typeof props.geojson !==
|
|
363
|
+
<span class="branch-3 cbranch-no" title="branch not covered" > typeof props.geojson !== 'undefined' </span>&&
|
|
550
364
|
<span class="branch-4 cbranch-no" title="branch not covered" > JSON.stringify(oldGeojsonRef.current) !== JSON.stringify(props.geojson)</span>
|
|
551
365
|
) {
|
|
552
366
|
<span class="cstat-no" title="statement not covered" > transitionToGeojson();</span>
|
|
@@ -577,7 +391,7 @@ export default MlTransitionGeoJsonLayer;
|
|
|
577
391
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
578
392
|
Code coverage generated by
|
|
579
393
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
580
|
-
at
|
|
394
|
+
at 2023-01-15T17:55:43.336Z
|
|
581
395
|
</div>
|
|
582
396
|
<script src="../../../prettify.js"></script>
|
|
583
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
|
|
104
|
+
at 2023-01-15T17:55:43.336Z
|
|
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
|
|
298
|
+
at 2023-01-15T17:55:43.336Z
|
|
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
|
|
104
|
+
at 2023-01-15T17:55:43.336Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">64.7% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>22/34</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -202,7 +202,8 @@
|
|
|
202
202
|
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
203
|
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
204
|
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
-
<a name='L140'></a><a href='#L140'>140</a
|
|
205
|
+
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
206
207
|
<span class="cline-any cline-neutral"> </span>
|
|
207
208
|
<span class="cline-any cline-neutral"> </span>
|
|
208
209
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -254,7 +255,6 @@
|
|
|
254
255
|
<span class="cline-any cline-neutral"> </span>
|
|
255
256
|
<span class="cline-any cline-neutral"> </span>
|
|
256
257
|
<span class="cline-any cline-neutral"> </span>
|
|
257
|
-
<span class="cline-any cline-neutral"> </span>
|
|
258
258
|
<span class="cline-any cline-yes">8x</span>
|
|
259
259
|
<span class="cline-any cline-yes">8x</span>
|
|
260
260
|
<span class="cline-any cline-yes">8x</span>
|
|
@@ -273,6 +273,8 @@
|
|
|
273
273
|
<span class="cline-any cline-neutral"> </span>
|
|
274
274
|
<span class="cline-any cline-neutral"> </span>
|
|
275
275
|
<span class="cline-any cline-neutral"> </span>
|
|
276
|
+
<span class="cline-any cline-neutral"> </span>
|
|
277
|
+
<span class="cline-any cline-neutral"> </span>
|
|
276
278
|
<span class="cline-any cline-yes">8x</span>
|
|
277
279
|
<span class="cline-any cline-yes">8x</span>
|
|
278
280
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -386,8 +388,7 @@ const MlVectorTileLayer = (props: MlVectorTileLayerProps) => {
|
|
|
386
388
|
layerId.current,
|
|
387
389
|
{
|
|
388
390
|
type: 'vector',
|
|
389
|
-
tiles: [props.url]
|
|
390
|
-
tileSize: 512,
|
|
391
|
+
tiles: [props.url || <span class="branch-1 cbranch-no" title="branch not covered" >""]</span>,
|
|
391
392
|
attribution: '',
|
|
392
393
|
...props.sourceOptions,
|
|
393
394
|
},
|
|
@@ -403,6 +404,8 @@ const MlVectorTileLayer = (props: MlVectorTileLayerProps) => {
|
|
|
403
404
|
maxzoom: 22,
|
|
404
405
|
layout: {},
|
|
405
406
|
paint: {
|
|
407
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
408
|
+
// @ts-ignore
|
|
406
409
|
'line-opacity': 0.5,
|
|
407
410
|
'line-color': 'rgb(80, 80, 80)',
|
|
408
411
|
'line-width': 2,
|
|
@@ -487,7 +490,7 @@ export default MlVectorTileLayer;
|
|
|
487
490
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
488
491
|
Code coverage generated by
|
|
489
492
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
490
|
-
at
|
|
493
|
+
at 2023-01-15T17:55:43.336Z
|
|
491
494
|
</div>
|
|
492
495
|
<script src="../../../prettify.js"></script>
|
|
493
496
|
<script>
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">64.7% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>22/34</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
@@ -85,8 +85,8 @@
|
|
|
85
85
|
</td>
|
|
86
86
|
<td data-value="79.24" class="pct medium">79.24%</td>
|
|
87
87
|
<td data-value="53" class="abs medium">42/53</td>
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="
|
|
88
|
+
<td data-value="64.7" class="pct medium">64.7%</td>
|
|
89
|
+
<td data-value="34" class="abs medium">22/34</td>
|
|
90
90
|
<td data-value="88.88" class="pct high">88.88%</td>
|
|
91
91
|
<td data-value="9" class="abs high">8/9</td>
|
|
92
92
|
<td data-value="84.78" class="pct high">84.78%</td>
|
|
@@ -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-15T17:55:43.336Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html
CHANGED
|
@@ -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
|
|
265
|
+
at 2023-01-15T17:55:43.336Z
|
|
266
266
|
</div>
|
|
267
267
|
<script src="../../../prettify.js"></script>
|
|
268
268
|
<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-15T17:55:43.336Z
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|