@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
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FeatureCollection } from '@turf/turf';
|
|
2
|
+
import { MetadataType } from '../../hooks/useGpx/useGpx';
|
|
3
|
+
export interface MlGpxViewerProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id of the target MapLibre instance in mapHook
|
|
6
|
+
*/
|
|
7
|
+
mapId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* The layerId of an existing layer this layer should be rendered visually beneath
|
|
10
|
+
* https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
|
|
11
|
+
*/
|
|
12
|
+
insertBeforeLayer?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Prefix of the component id this component uses when adding elements to the MapLibreGl-instance
|
|
15
|
+
*/
|
|
16
|
+
idPrefix?: string;
|
|
17
|
+
gpxData: string | undefined;
|
|
18
|
+
onParseGpxData: (arg0: {
|
|
19
|
+
geojson: FeatureCollection | undefined;
|
|
20
|
+
metadata: MetadataType[];
|
|
21
|
+
}) => void;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* MlGpxViewer visualizes a given GPX Track on the map
|
|
25
|
+
*/
|
|
26
|
+
declare const MlGpxViewer: {
|
|
27
|
+
(props: MlGpxViewerProps): JSX.Element;
|
|
28
|
+
defaultProps: {};
|
|
29
|
+
};
|
|
30
|
+
export default MlGpxViewer;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlGpxViewer").MlGpxViewerProps): JSX.Element;
|
|
5
|
+
defaultProps: {};
|
|
6
|
+
};
|
|
7
|
+
argTypes: {
|
|
8
|
+
options: {
|
|
9
|
+
control: {
|
|
10
|
+
type: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
15
|
+
};
|
|
16
|
+
export default storyoptions;
|
|
17
|
+
export declare const ExampleConfig: any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { FeatureCollection } from '@turf/turf';
|
|
3
|
+
type ContextProps = {
|
|
4
|
+
data: FeatureCollection;
|
|
5
|
+
setData: Function;
|
|
6
|
+
getEmptyFeatureCollection: Function;
|
|
7
|
+
};
|
|
8
|
+
declare const GeoJsonContext: React.Context<Partial<ContextProps>>;
|
|
9
|
+
export declare const GeoJsonContextProvider: React.Provider<Partial<ContextProps>>;
|
|
10
|
+
export default GeoJsonContext;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
interface MlGpxDemoLoaderProps {
|
|
2
|
+
open: boolean;
|
|
3
|
+
setOpen: (open: boolean) => void;
|
|
4
|
+
setGpx: (gpx: string | undefined) => void;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* MlGpxDemoLoader returns a button to load a Demo GPX Track into the map.
|
|
8
|
+
*/
|
|
9
|
+
declare const MlGpxDemoLoader: (props: MlGpxDemoLoaderProps) => JSX.Element;
|
|
10
|
+
export default MlGpxDemoLoader;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { SymbolLayerSpecification } from 'maplibre-gl';
|
|
2
|
+
import { Feature, FeatureCollection } from '@turf/turf';
|
|
3
|
+
export interface MlImageMarkerLayerProps {
|
|
2
4
|
/**
|
|
3
5
|
* Id of the target MapLibre instance in mapContext
|
|
4
6
|
*/
|
|
@@ -23,7 +25,14 @@ interface MlImageMarkerLayerProps {
|
|
|
23
25
|
/**
|
|
24
26
|
* Javascript object that is passed the addLayer command as first parameter.
|
|
25
27
|
*/
|
|
26
|
-
options?:
|
|
28
|
+
options?: {
|
|
29
|
+
source?: {
|
|
30
|
+
type?: string | undefined;
|
|
31
|
+
data: Feature | FeatureCollection | undefined;
|
|
32
|
+
};
|
|
33
|
+
layout?: SymbolLayerSpecification['layout'];
|
|
34
|
+
paint?: SymbolLayerSpecification['paint'];
|
|
35
|
+
};
|
|
27
36
|
}
|
|
28
37
|
declare const MlImageMarkerLayer: (props: MlImageMarkerLayerProps) => JSX.Element;
|
|
29
38
|
export default MlImageMarkerLayer;
|
|
@@ -1,10 +1,8 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: (props: import("./MlImageMarkerLayer").MlImageMarkerLayerProps) => JSX.Element;
|
|
4
|
+
argTypes: {};
|
|
5
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
6
|
+
};
|
|
1
7
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlImageMarkerLayer as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlImageMarkerLayer from "./MlImageMarkerLayer";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
8
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.css';
|
|
3
|
+
export interface MlLayerMagnifyProps {
|
|
3
4
|
/**
|
|
4
5
|
* Id of the first MapLibre instance
|
|
5
6
|
*/
|
|
@@ -12,6 +13,10 @@ interface MlLayerMagnifyProps {
|
|
|
12
13
|
* Size of the "magnifier"-circle
|
|
13
14
|
*/
|
|
14
15
|
magnifierRadius?: number;
|
|
16
|
+
/**
|
|
17
|
+
* object (React.CSSProperties) that is added to the magnifier default style
|
|
18
|
+
*/
|
|
19
|
+
magnifierStyle: React.CSSProperties | undefined;
|
|
15
20
|
}
|
|
16
21
|
/**
|
|
17
22
|
*
|
|
@@ -22,6 +27,7 @@ declare const MlLayerMagnify: {
|
|
|
22
27
|
(props: MlLayerMagnifyProps): JSX.Element;
|
|
23
28
|
defaultProps: {
|
|
24
29
|
magnifierRadius: number;
|
|
30
|
+
magnifierStyle: {};
|
|
25
31
|
};
|
|
26
32
|
};
|
|
27
33
|
export default MlLayerMagnify;
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlLayerMagnify").MlLayerMagnifyProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
magnifierRadius: number;
|
|
7
|
+
magnifierStyle: {};
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
argTypes: {};
|
|
11
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
12
|
+
};
|
|
1
13
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlLayerMagnify as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { multiMapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlLayerMagnify from "./MlLayerMagnify";
|
|
10
|
-
import multiMapContextDecorator from "../../decorators/MultiMapContextDecorator";
|
|
14
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './style.css';
|
|
3
|
+
export interface MlLayerSwipeProps {
|
|
3
4
|
/**
|
|
4
5
|
* Id of the first MapLibre instance.
|
|
5
6
|
*/
|
|
@@ -8,9 +9,18 @@ interface MlLayerSwipeProps {
|
|
|
8
9
|
* Id of the second MapLibre instance.
|
|
9
10
|
*/
|
|
10
11
|
map2Id: string;
|
|
12
|
+
/**
|
|
13
|
+
* object (React.CSSProperties) that is added to the button default style
|
|
14
|
+
*/
|
|
15
|
+
buttonStyle: React.CSSProperties | undefined;
|
|
11
16
|
}
|
|
12
17
|
/**
|
|
13
18
|
* creates a split view of 2 synchronised maplibre instances
|
|
14
19
|
*/
|
|
15
|
-
declare const MlLayerSwipe:
|
|
20
|
+
declare const MlLayerSwipe: {
|
|
21
|
+
(props: MlLayerSwipeProps): JSX.Element;
|
|
22
|
+
defaultProps: {
|
|
23
|
+
buttonStyle: {};
|
|
24
|
+
};
|
|
25
|
+
};
|
|
16
26
|
export default MlLayerSwipe;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlLayerSwipe").MlLayerSwipeProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
buttonStyle: {};
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
argTypes: {};
|
|
10
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
11
|
+
};
|
|
1
12
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export const name: string;
|
|
6
|
-
export { MlLayerSwipe as component };
|
|
7
|
-
export const argTypes: {};
|
|
8
|
-
export { multiMapContextDecorator as decorators };
|
|
9
|
-
}
|
|
10
|
-
import MlLayerSwipe from "./MlLayerSwipe";
|
|
11
|
-
import multiMapContextDecorator from "../../decorators/MultiMapContextDecorator";
|
|
13
|
+
export declare const ExampleConfig: any;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { paintPropsType } from './LayerPropertyForm';
|
|
2
|
+
type Props = {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
propKey: string;
|
|
6
|
+
setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
|
|
7
|
+
};
|
|
8
|
+
export default function PaintPropsColorPicker({ propKey, value, setPaintProps }: Props): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
type Props = {
|
|
2
|
+
layerComponent: JSX.Element;
|
|
3
|
+
visible: boolean;
|
|
4
|
+
configurable: boolean;
|
|
5
|
+
type?: 'background' | 'background-labels' | 'layer' | 'wms-layer' | 'vector-tile-layer';
|
|
6
|
+
name: string;
|
|
7
|
+
description?: string;
|
|
8
|
+
additionalButtons?: JSX.Element;
|
|
9
|
+
};
|
|
10
|
+
declare function LayerListItem({ layerComponent, visible, type, name, description, configurable, }: Props): JSX.Element;
|
|
11
|
+
export default LayerListItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
|
|
2
|
+
export type paintPropsType = CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
3
|
+
type Props = {
|
|
4
|
+
paintProps: paintPropsType;
|
|
5
|
+
setPaintProps: (paintProps: paintPropsType | ((current: paintPropsType) => paintPropsType)) => void;
|
|
6
|
+
layerType: string;
|
|
7
|
+
};
|
|
8
|
+
export default function LayerPropertyForm({ paintProps, setPaintProps }: Props): JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { SxProps } from '@mui/system/styleFunctionSx/styleFunctionSx';
|
|
2
|
+
interface MlSketchToolProps {
|
|
3
|
+
/**
|
|
4
|
+
* Id of the target MapLibre instance in mapContext
|
|
5
|
+
*/
|
|
6
|
+
mapId?: string;
|
|
7
|
+
/**
|
|
8
|
+
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
9
|
+
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
10
|
+
*/
|
|
11
|
+
insertBeforeLayer?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Style attribute for the button-style
|
|
14
|
+
* https://mui.com/system/getting-started/the-sx-prop/
|
|
15
|
+
*/
|
|
16
|
+
buttonStyleOverride?: SxProps;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Component template
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
declare const MlSketchTool: {
|
|
23
|
+
(props: MlSketchToolProps): JSX.Element;
|
|
24
|
+
defaultProps: {
|
|
25
|
+
mapId: undefined;
|
|
26
|
+
buttonStyleOverride: {};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default MlSketchTool;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default storyoptions;
|
|
2
|
+
export const ExampleConfig: any;
|
|
3
|
+
declare namespace storyoptions {
|
|
4
|
+
export const title: string;
|
|
5
|
+
export { MlSketchTool as component };
|
|
6
|
+
export const argTypes: {};
|
|
7
|
+
export { mapContextDecorator as decorators };
|
|
8
|
+
}
|
|
9
|
+
import MlSketchTool from "./MlSketchTool";
|
|
10
|
+
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
@@ -1,20 +1,39 @@
|
|
|
1
|
-
|
|
1
|
+
import { Feature, FeatureCollection } from '@turf/turf';
|
|
2
2
|
/**
|
|
3
3
|
* MlSpatialElevationProfile returns a Button that will add a standard OSM tile layer to the maplibre-gl instance.
|
|
4
4
|
*
|
|
5
5
|
* @component
|
|
6
6
|
*/
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
interface geojson {
|
|
8
|
+
features: Feature | FeatureCollection | undefined;
|
|
9
|
+
}
|
|
10
|
+
export interface MlSpatialElevationProfileProps {
|
|
11
|
+
/**
|
|
12
|
+
* Id of the target MapLibre instance in mapContext
|
|
13
|
+
*/
|
|
14
|
+
mapId?: string;
|
|
15
|
+
/**
|
|
16
|
+
* GeoJSON data that is supposed to be rendered by this component.
|
|
17
|
+
*/
|
|
18
|
+
geojson: geojson | FeatureCollection | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Prefix of the component id this component uses when adding elements to the MapLibreGl-instance
|
|
21
|
+
*/
|
|
22
|
+
idPrefix?: string;
|
|
23
|
+
/**
|
|
24
|
+
* Number describes the factor of the height of the elevation
|
|
25
|
+
*/
|
|
26
|
+
elevationFactor?: number;
|
|
27
|
+
/**
|
|
28
|
+
* The layerId of an existing layer this layer should be rendered visually beneath
|
|
29
|
+
* https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
|
|
30
|
+
*/
|
|
31
|
+
insertBeforeLayer?: string;
|
|
19
32
|
}
|
|
20
|
-
|
|
33
|
+
declare const MlSpatialElevationProfile: {
|
|
34
|
+
(props: MlSpatialElevationProfileProps): JSX.Element;
|
|
35
|
+
defaultProps: {
|
|
36
|
+
elevationFactor: number;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
export default MlSpatialElevationProfile;
|
|
@@ -1,16 +1,19 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlSpatialElevationProfile").MlSpatialElevationProfileProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
elevationFactor: number;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
argTypes: {
|
|
10
|
+
options: {
|
|
11
|
+
control: {
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
17
|
+
};
|
|
1
18
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlSpatialElevationProfile as component };
|
|
6
|
-
export namespace argTypes {
|
|
7
|
-
namespace options {
|
|
8
|
-
namespace control {
|
|
9
|
-
const type: string;
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
export { mapContextDecorator as decorators };
|
|
14
|
-
}
|
|
15
|
-
import MlSpatialElevationProfile from "./MlSpatialElevationProfile";
|
|
16
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
19
|
+
export declare const ExampleConfig: any;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
interface geometry {
|
|
2
|
+
coordinates: Array<number>;
|
|
3
|
+
}
|
|
4
|
+
interface line {
|
|
5
|
+
geometry: geometry;
|
|
6
|
+
}
|
|
7
|
+
interface _geojsonInfo {
|
|
8
|
+
line: line;
|
|
9
|
+
min: number;
|
|
10
|
+
}
|
|
11
|
+
export default function getElevationData(_geojsonInfo: _geojsonInfo, elevationFactor: number): import("@turf/turf").FeatureCollection<GeoJSON.Geometry, {
|
|
12
|
+
[name: string]: any;
|
|
13
|
+
}>;
|
|
14
|
+
export {};
|
|
@@ -1,71 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
interface MlTransitionGeoJsonLayerProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the target MapLibre instance in mapContext
|
|
6
|
-
*/
|
|
7
|
-
mapId: string;
|
|
8
|
-
/**
|
|
9
|
-
* GeoJSON data that is supposed to be rendered by this component.
|
|
10
|
-
*/
|
|
11
|
-
geojson: Feature | FeatureCollection | undefined;
|
|
12
|
-
/**
|
|
13
|
-
* Type of the layer that will be added to the MapLibre instance.
|
|
14
|
-
* Possible values: "line", "circle", "fill"
|
|
15
|
-
*/
|
|
16
|
-
type?: "fill" | "line" | "circle";
|
|
17
|
-
/**
|
|
18
|
-
* Paint property object, that is passed to the addLayer call.
|
|
19
|
-
* Possible props depend on the layer type.
|
|
20
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
21
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
22
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
23
|
-
*/
|
|
24
|
-
paint?: CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
25
|
-
/**
|
|
26
|
-
* Layout property object, that is passed to the addLayer call.
|
|
27
|
-
* Possible props depend on the layer type.
|
|
28
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
29
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
30
|
-
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
31
|
-
*/
|
|
32
|
-
layout?: CircleLayerSpecification['layout'] | FillLayerSpecification['layout'] | LineLayerSpecification['layout'];
|
|
33
|
-
/**
|
|
34
|
-
* Javascript object that is spread into the addLayer commands first parameter.
|
|
35
|
-
*/
|
|
36
|
-
options?: CircleLayerSpecification | FillLayerSpecification | LineLayerSpecification;
|
|
37
|
-
/**
|
|
38
|
-
* Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
|
|
39
|
-
*/
|
|
40
|
-
defaultPaintOverrides?: {
|
|
41
|
-
circle?: CircleLayerSpecification['paint'];
|
|
42
|
-
fill?: FillLayerSpecification['paint'];
|
|
43
|
-
line?: LineLayerSpecification['paint'];
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
47
|
-
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
48
|
-
*/
|
|
49
|
-
insertBeforeLayer: string;
|
|
50
|
-
/**
|
|
51
|
-
* Hover event handler that is executed whenever a geometry rendered by this component is hovered.
|
|
52
|
-
*/
|
|
53
|
-
onHover?: MapLayerMouseEvent;
|
|
54
|
-
/**
|
|
55
|
-
* Click event handler that is executed whenever a geometry rendered by this component is clicked.
|
|
56
|
-
*/
|
|
57
|
-
onClick?: MapLayerMouseEvent;
|
|
58
|
-
/**
|
|
59
|
-
* Leave event handler that is executed whenever a geometry rendered by this component is
|
|
60
|
-
* left/unhovered.
|
|
61
|
-
*/
|
|
62
|
-
onLeave?: MapLayerMouseEvent;
|
|
63
|
-
/**
|
|
64
|
-
* Creates transition animation whenever the geojson prop changes.
|
|
65
|
-
* Only works with layer type "line" and LineString GeoJSON data.
|
|
66
|
-
*/
|
|
1
|
+
import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
|
|
2
|
+
type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
|
|
67
3
|
transitionTime: number;
|
|
68
|
-
}
|
|
4
|
+
};
|
|
69
5
|
/**
|
|
70
6
|
* Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
|
|
71
7
|
*/
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import PropTypes from
|
|
1
|
+
import PropTypes from 'prop-types';
|
|
2
|
+
import { RasterLayerSpecification, RasterSourceSpecification } from 'maplibre-gl';
|
|
2
3
|
interface MlWmsLayerProps {
|
|
3
|
-
urlParameters?:
|
|
4
|
+
urlParameters?: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
4
7
|
url: string;
|
|
5
8
|
visible?: boolean;
|
|
6
9
|
attribution?: string;
|
|
7
10
|
mapId?: string;
|
|
8
|
-
sourceOptions?:
|
|
9
|
-
layerOptions?:
|
|
11
|
+
sourceOptions?: RasterSourceSpecification;
|
|
12
|
+
layerOptions?: RasterLayerSpecification;
|
|
10
13
|
insertBeforeLayer?: string;
|
|
11
14
|
layerId?: string;
|
|
12
15
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { useWmsProps } from '../../hooks/useWms';
|
|
2
|
+
import { LngLat } from 'maplibre-gl';
|
|
3
|
+
import { Layer2 } from 'wms-capabilities';
|
|
4
|
+
export interface MlWmsLoaderProps {
|
|
3
5
|
/**
|
|
4
6
|
* WMS URL
|
|
5
7
|
*/
|
|
@@ -11,18 +13,23 @@ interface MlWmsLoaderProps {
|
|
|
11
13
|
/**
|
|
12
14
|
* URL parameters that will be used in the getCapabilities request
|
|
13
15
|
*/
|
|
14
|
-
urlParameters
|
|
16
|
+
urlParameters?: useWmsProps['urlParameters'];
|
|
15
17
|
/**
|
|
16
18
|
* URL parameters that will be added when requesting WMS capabilities
|
|
17
19
|
*/
|
|
18
|
-
wmsUrlParameters
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
lngLat: LngLat;
|
|
24
|
-
idPrefix: string;
|
|
20
|
+
wmsUrlParameters?: {
|
|
21
|
+
[key: string]: string;
|
|
22
|
+
};
|
|
23
|
+
lngLat?: LngLat;
|
|
24
|
+
idPrefix?: string;
|
|
25
25
|
}
|
|
26
|
+
export type LayerType = {
|
|
27
|
+
visible: boolean;
|
|
28
|
+
Name: string;
|
|
29
|
+
Attribution?: {
|
|
30
|
+
Title: string;
|
|
31
|
+
};
|
|
32
|
+
} & Omit<Layer2, 'Layer'> & Partial<Pick<Layer2, 'Layer'>>;
|
|
26
33
|
/**
|
|
27
34
|
* Loads a WMS getCapabilities xml document and adds a MlWmsLayer component for each layer that is
|
|
28
35
|
* offered by the WMS.
|
|
@@ -1,13 +1,24 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlWmsLoader").MlWmsLoaderProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
url: string;
|
|
7
|
+
urlParameters: {
|
|
8
|
+
SERVICE: string;
|
|
9
|
+
VERSION: string;
|
|
10
|
+
REQUEST: string;
|
|
11
|
+
};
|
|
12
|
+
wmsUrlParameters: {
|
|
13
|
+
TRANSPARENT: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
argTypes: {
|
|
18
|
+
url: {};
|
|
19
|
+
layer: {};
|
|
20
|
+
};
|
|
21
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
22
|
+
};
|
|
1
23
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlWmsLoader as component };
|
|
6
|
-
export namespace argTypes {
|
|
7
|
-
const url: {};
|
|
8
|
-
const layer: {};
|
|
9
|
-
}
|
|
10
|
-
export { mapContextDecorator as decorators };
|
|
11
|
-
}
|
|
12
|
-
import MlWmsLoader from "./MlWmsLoader";
|
|
13
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
24
|
+
export declare const ExampleConfig: any;
|
|
@@ -2,7 +2,7 @@ export default SimpleDataProvider;
|
|
|
2
2
|
declare function SimpleDataProvider(props: any): JSX.Element;
|
|
3
3
|
declare namespace SimpleDataProvider {
|
|
4
4
|
namespace propTypes {
|
|
5
|
-
const children: PropTypes.Validator<
|
|
5
|
+
const children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
import PropTypes from "prop-types";
|
package/dist/custom.d.d.ts
CHANGED