@mapcomponents/react-maplibre 0.1.63 → 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/.editorconfig +1 -1
- package/.eslintrc.js +9 -6
- package/.github/workflows/check-catalogue-metadata-schema.yml +19 -0
- package/CHANGELOG.md +27 -2
- package/coverage/clover.xml +671 -1032
- package/coverage/coverage-final.json +24 -21
- package/coverage/lcov-report/index.html +112 -82
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +24 -24
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +5 -5
- package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +2 -2
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.cy.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfForm/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +2 -5
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +40 -19
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx.html +112 -0
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +115 -0
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +34 -4
- package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +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 → MlGpxViewer}/index.html +23 -38
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +63 -285
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +21 -21
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +58 -76
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +58 -61
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +11 -11
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +30 -21
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
- package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
- package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/ColorPicker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/MlSketchTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.html +514 -0
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +21 -21
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +20 -206
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +10 -7
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +5 -5
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +111 -57
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +19 -19
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +201 -144
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +9 -9
- package/coverage/lcov-report/src/contexts/MapContext.tsx.html +23 -23
- package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
- package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
- package/coverage/lcov-report/src/contexts/index.html +1 -1
- package/coverage/lcov-report/src/hooks/index.html +50 -50
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useCameraFollowPath/useCameraFollowPath.tsx.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/index.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useExportMap/lib.ts.html +1 -1
- package/coverage/lcov-report/src/hooks/useGpx/index.html +116 -0
- package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +295 -0
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +132 -66
- package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +1 -1
- package/coverage/lcov-report/src/hooks/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 +1284 -1959
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +51 -25
- package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +3 -2
- package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +35 -16
- package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +1 -1
- package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +12 -9
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +1 -1
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +12 -9
- package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +1 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +22 -11
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +4 -95
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +3 -0
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +3 -0
- package/dist/components/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/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/decorators/ThemeWrapper.d.ts +3 -1
- package/dist/hooks/useGpx/lib/gpxConverter.d.ts +11 -0
- package/dist/hooks/useGpx/useGpx.d.ts +26 -0
- package/dist/hooks/useGpx/useGpx.stories.d.ts +10 -0
- package/dist/hooks/useLayer.d.ts +13 -7
- package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.d.ts +23 -0
- package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +10 -0
- package/dist/hooks/useMap.d.ts +1 -1
- package/dist/hooks/useMap.test.d.ts +1 -0
- package/dist/hooks/useSource.d.ts +2 -2
- package/dist/hooks/useWms.d.ts +24 -16
- package/dist/index.d.ts +5 -5
- package/dist/index.esm.js +9310 -14006
- package/dist/index.esm.js.map +1 -1
- package/dist/setupTests.d.ts +6 -5
- package/dist/ui_components/Dropzone.d.ts +5 -0
- package/dist/ui_components/ImageLoader.d.ts +8 -1
- package/dist/ui_components/LoadingOverlayContext.d.ts +11 -11
- package/dist/ui_components/Sidebar.d.ts +7 -6
- package/dist/ui_components/Tooltip.d.ts +1 -1
- package/dist/ui_components/TopToolbar.d.ts +4 -3
- package/dist/ui_components/UploadButton.d.ts +6 -0
- package/dist/util/BubbleForInstructions.d.ts +2 -0
- package/dist/util/Instructions.d.ts +13 -0
- package/package.json +195 -191
- package/{src/components/MlImageMarkerLayer → public}/assets/wg-marker.png +0 -0
- package/scripts/build-catalogue-meta.js +35 -11
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +230 -188
- package/src/components/MlCenterPosition/MlCenterPosition.meta_.json +1 -2
- package/src/components/MlCenterPosition/MlCenterPosition.stories.tsx +20 -0
- package/src/components/MlCenterPosition/MlCenterPosition.tsx +4 -4
- package/src/components/MlComponentTemplate/MlComponentTemplate.meta_.json +1 -2
- package/src/components/MlComponentTemplate/{MlComponentTemplate.stories.js → MlComponentTemplate.stories.tsx} +2 -2
- package/src/components/MlComponentTemplate/MlComponentTemplate.tsx +1 -1
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta_.json +1 -2
- package/src/components/MlCreatePdfButton/{MlCreatePdfButton.stories.js → MlCreatePdfButton.stories.tsx} +1 -1
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx +1 -1
- package/src/components/MlCreatePdfForm/MlCreatePdfForm.meta.json +1 -2
- package/src/components/MlCreatePdfForm/lib/PdfForm.tsx +25 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +1 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +0 -1
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.meta.json +1 -2
- package/src/components/MlFollowGps/MlFollowGps.meta.json +1 -2
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -2
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.tsx +89 -0
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +24 -17
- package/src/components/MlGeoJsonLayer/assets/earthquake.json +109937 -0
- package/src/components/MlGeoJsonLayer/assets/wg_locations.json +65 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx +9 -0
- package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx +10 -0
- package/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.meta_.json +1 -2
- package/src/components/{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/MlSketchTool.meta.json +1 -2
- 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 +1 -2
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.js +2 -3
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +17 -79
- package/src/components/MlUseMapDebugger/MlUseMapDebugger.meta_.json +1 -2
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +1 -2
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +3 -2
- package/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.meta_.json +1 -2
- package/src/components/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 +12 -10
- package/src/ui_components/Tooltip.tsx +17 -0
- package/src/ui_components/TopToolbar.tsx +5 -3
- package/src/ui_components/UploadButton.tsx +57 -0
- package/src/util/BubbleForInstructions.js +46 -0
- package/src/util/Instructions.tsx +60 -0
- package/tsconfig.json +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +0 -1222
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +0 -1645
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +0 -757
- package/dist/components/MlGPXViewer/util/MlGPXViewerInstructions.d.ts +0 -1
- package/dist/components/MlGPXViewer/util/SampleLayer.d.ts +0 -0
- package/dist/components/MlGPXViewer/util/demoViewer.d.ts +0 -5
- package/src/components/MlGPXViewer/MlGPXViewer.stories.js +0 -91
- package/src/components/MlGPXViewer/MlGPXViewer.test.js +0 -28
- package/src/components/MlGPXViewer/MlGPXViewer.tsx +0 -379
- package/src/components/MlGPXViewer/util/MlGPXViewerInstructions.js +0 -145
- package/src/components/MlGPXViewer/util/SampleLayer.js +0 -2
- package/src/components/MlGPXViewer/util/demoViewer.js +0 -254
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.js +0 -45
- package/src/components/MlLayerMagnify/MlLayerMagnify.stories.js +0 -41
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js +0 -224
- package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +0 -57
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +0 -47
- package/src/decorators/ThemeWrapper.jsx +0 -9
- package/src/ui_components/Legend.js +0 -44
- package/src/ui_components/LoadingOverlay.js +0 -41
- package/src/ui_components/Tooltip.js +0 -21
|
@@ -1,6 +1,11 @@
|
|
|
1
|
-
import { IControl, MapOptions as MapOptionsType } from
|
|
2
|
-
import { Map as MapType } from
|
|
3
|
-
type
|
|
1
|
+
import { Map, IControl, MapOptions as MapOptionsType, MapEventType, MapLayerEventType, StyleImageInterface, LayerSpecification, CustomLayerInterface, SourceSpecification, ControlPosition } from '!maplibre-gl';
|
|
2
|
+
import { Map as MapType, Style } from 'maplibre-gl';
|
|
3
|
+
type WrapperEventArgArray = [string, (arg0: unknown) => void];
|
|
4
|
+
type EventArgArray = [
|
|
5
|
+
keyof MapLayerEventType | keyof MapEventType,
|
|
6
|
+
string | ((arg0: unknown) => void),
|
|
7
|
+
((arg0: unknown) => void)?
|
|
8
|
+
];
|
|
4
9
|
type LayerState = {
|
|
5
10
|
id: string;
|
|
6
11
|
type: string;
|
|
@@ -29,47 +34,68 @@ declare class MapLibreGlWrapper {
|
|
|
29
34
|
layers: [string?];
|
|
30
35
|
sources: [string?];
|
|
31
36
|
images: [string?];
|
|
32
|
-
controls: [IControl?];
|
|
37
|
+
controls: [(IControl | unknown)?];
|
|
33
38
|
events: [EventArgArray?];
|
|
34
|
-
wrapperEvents: [
|
|
39
|
+
wrapperEvents: [WrapperEventArgArray?];
|
|
35
40
|
};
|
|
36
41
|
};
|
|
37
42
|
baseLayers: [string?];
|
|
38
43
|
firstSymbolLayer: string | undefined;
|
|
39
44
|
eventHandlers: {
|
|
40
|
-
layerchange:
|
|
41
|
-
|
|
45
|
+
layerchange: {
|
|
46
|
+
handler: (ev: unknown) => void;
|
|
47
|
+
options?: object | string;
|
|
48
|
+
}[];
|
|
49
|
+
viewportchange: {
|
|
50
|
+
handler: (ev: unknown) => void;
|
|
51
|
+
}[];
|
|
42
52
|
};
|
|
43
53
|
wrapper: {
|
|
44
|
-
on:
|
|
45
|
-
off:
|
|
46
|
-
fire:
|
|
47
|
-
layerState: [
|
|
54
|
+
on: (eventName: string, handler: (ev: unknown) => void, options?: object | string, componentId?: string) => void;
|
|
55
|
+
off: (type: string, listener: (ev: unknown) => void) => void;
|
|
56
|
+
fire: (eventName: string, context?: unknown) => void;
|
|
57
|
+
layerState: LayerState[];
|
|
48
58
|
layerStateString: string;
|
|
49
59
|
oldLayerStateStrings: object;
|
|
50
|
-
buildLayerObject:
|
|
51
|
-
buildLayerObjects:
|
|
52
|
-
refreshLayerState:
|
|
60
|
+
buildLayerObject: (layer: ReturnType<Style['getLayer']>) => LayerState;
|
|
61
|
+
buildLayerObjects: () => LayerState[];
|
|
62
|
+
refreshLayerState: () => void;
|
|
53
63
|
viewportState: ViewportState;
|
|
54
64
|
viewportStateString: string;
|
|
55
65
|
oldViewportStateString: string;
|
|
56
|
-
getViewport:
|
|
57
|
-
|
|
66
|
+
getViewport: () => {
|
|
67
|
+
center: {
|
|
68
|
+
lng: number;
|
|
69
|
+
lat: number;
|
|
70
|
+
};
|
|
71
|
+
zoom: number;
|
|
72
|
+
bearing: number;
|
|
73
|
+
pitch: number;
|
|
74
|
+
};
|
|
75
|
+
refreshViewport: () => void;
|
|
58
76
|
};
|
|
59
|
-
initRegisteredElements:
|
|
60
|
-
addNativeMaplibreFunctionsAndProps:
|
|
77
|
+
initRegisteredElements: (componentId: string, force?: boolean | undefined) => void;
|
|
78
|
+
addNativeMaplibreFunctionsAndProps: () => void;
|
|
61
79
|
map: MapType;
|
|
62
80
|
style: object;
|
|
63
81
|
styleJson: object;
|
|
64
|
-
addLayer:
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
82
|
+
addLayer: (layer: (LayerSpecification & {
|
|
83
|
+
source?: string | SourceSpecification | undefined;
|
|
84
|
+
}) | (CustomLayerInterface & {
|
|
85
|
+
source?: string | SourceSpecification | undefined;
|
|
86
|
+
}), beforeId?: string | undefined, componentId?: string | undefined) => Map | undefined;
|
|
87
|
+
addSource: (id: string, source: SourceSpecification, componentId?: string | undefined) => Map | undefined;
|
|
88
|
+
addControl: (control: IControl | unknown, position?: ControlPosition | undefined, componentId?: string | undefined) => Map | undefined;
|
|
89
|
+
addImage: (id: string, image: HTMLImageElement | ImageBitmap | ImageData | {
|
|
90
|
+
width: number;
|
|
91
|
+
height: number;
|
|
92
|
+
data: Uint8Array | Uint8ClampedArray;
|
|
93
|
+
} | StyleImageInterface, componentId?: string | undefined) => void;
|
|
94
|
+
on: (type: keyof MapLayerEventType | keyof MapEventType | string, layerId: string | ((ev: unknown) => void), handler?: ((ev: MapEventType & unknown) => Map | void) | string, componentId?: string | undefined) => Map | undefined;
|
|
95
|
+
cleanup: (componentId: string) => void;
|
|
70
96
|
constructor(props: {
|
|
71
97
|
mapOptions: MapOptionsType;
|
|
72
|
-
onReady:
|
|
98
|
+
onReady: (map: MapType, context: unknown) => void;
|
|
73
99
|
});
|
|
74
100
|
}
|
|
75
101
|
export default MapLibreGlWrapper;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { SxProps, Theme } from "@mui/material";
|
|
2
|
+
export interface MlCenterPositionProps {
|
|
2
3
|
/**
|
|
3
4
|
* Id of the target MapLibre instance in mapContext
|
|
4
5
|
*/
|
|
@@ -19,7 +20,7 @@ interface MlCenterPositionProps {
|
|
|
19
20
|
/**
|
|
20
21
|
* CSS style object that is applied to the button component
|
|
21
22
|
*/
|
|
22
|
-
style?:
|
|
23
|
+
style?: SxProps<Theme> | undefined;
|
|
23
24
|
}
|
|
24
25
|
/**
|
|
25
26
|
* Component template
|
|
@@ -1,17 +1,36 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlCenterPosition").MlCenterPositionProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
mapId: undefined;
|
|
7
|
+
style: {
|
|
8
|
+
minWidth: string;
|
|
9
|
+
minHeight: string;
|
|
10
|
+
width: string;
|
|
11
|
+
height: string;
|
|
12
|
+
backgroundColor: string;
|
|
13
|
+
borderRadius: string;
|
|
14
|
+
margin: number;
|
|
15
|
+
fontSize: string;
|
|
16
|
+
":hover": {
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
color: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
onColor: string;
|
|
22
|
+
offColor: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
argTypes: {};
|
|
26
|
+
decorators: ((Story: any) => JSX.Element)[];
|
|
27
|
+
parameters: {
|
|
28
|
+
docs: {
|
|
29
|
+
source: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
};
|
|
1
35
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlCenterPosition as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
export namespace parameters {
|
|
9
|
-
namespace docs {
|
|
10
|
-
namespace source {
|
|
11
|
-
const type: string;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
import MlCenterPosition from "./MlCenterPosition";
|
|
17
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
36
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlComponentTemplate").MlComponentTemplateProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
mapId: undefined;
|
|
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 { MlComponentTemplate as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlComponentTemplate from "./MlComponentTemplate";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
13
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
declare const storyoptions: {
|
|
2
|
+
title: string;
|
|
3
|
+
component: {
|
|
4
|
+
(props: import("./MlCreatePdfButton").MlCreatePdfButtonProps): JSX.Element;
|
|
5
|
+
defaultProps: {
|
|
6
|
+
mapId: undefined;
|
|
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 { MlCreatePdfButton as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlCreatePdfButton from "./MlCreatePdfButton";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
13
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Feature, FeatureCollection } from '@turf/turf';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { useLayerProps } from '../../hooks/useLayer';
|
|
3
|
+
import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
|
|
4
|
+
export type MlGeoJsonLayerProps = {
|
|
4
5
|
/**
|
|
5
6
|
* Id of the target MapLibre instance in mapContext
|
|
6
7
|
*/
|
|
@@ -22,29 +23,39 @@ type MlGeoJsonLayerProps = {
|
|
|
22
23
|
geojson: Feature | FeatureCollection | undefined;
|
|
23
24
|
/**
|
|
24
25
|
* Type of the layer that will be added to the MapLibre instance.
|
|
25
|
-
*
|
|
26
|
+
* All types from LayerSpecification union type are supported except the type from
|
|
27
|
+
* RasterLayerSpecification
|
|
26
28
|
*/
|
|
27
|
-
type?: '
|
|
29
|
+
type?: Exclude<LayerSpecification['type'], RasterLayerSpecification['type']>;
|
|
28
30
|
/**
|
|
29
31
|
* Paint property object, that is passed to the addLayer call.
|
|
30
32
|
* Possible props depend on the layer type.
|
|
33
|
+
* See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
|
|
34
|
+
* Some examples are:
|
|
31
35
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
32
36
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
33
37
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
38
|
+
* All paint types from LayerSpecification union type are supported except the paint type from
|
|
39
|
+
* RasterLayerSpecification
|
|
34
40
|
*/
|
|
35
|
-
paint?:
|
|
41
|
+
paint?: Exclude<LayerSpecification['paint'], RasterLayerSpecification['paint']>;
|
|
36
42
|
/**
|
|
37
43
|
* Layout property object, that is passed to the addLayer call.
|
|
38
44
|
* Possible props depend on the layer type.
|
|
45
|
+
* See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
|
|
46
|
+
* Some examples are:
|
|
39
47
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
|
|
40
48
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
41
49
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
50
|
+
* All layout types from LayerSpecification union type are supported except the layout type from
|
|
51
|
+
* RasterLayerSpecification
|
|
52
|
+
|
|
42
53
|
*/
|
|
43
|
-
layout?:
|
|
54
|
+
layout?: Exclude<LayerSpecification['layout'], RasterLayerSpecification['layout']>;
|
|
44
55
|
/**
|
|
45
56
|
* Javascript object that is spread into the addLayer commands first parameter.
|
|
46
57
|
*/
|
|
47
|
-
options?:
|
|
58
|
+
options?: Exclude<LayerSpecification, RasterLayerSpecification>;
|
|
48
59
|
/**
|
|
49
60
|
* Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
|
|
50
61
|
*/
|
|
@@ -56,19 +67,19 @@ type MlGeoJsonLayerProps = {
|
|
|
56
67
|
/**
|
|
57
68
|
* Hover event handler that is executed whenever a geometry rendered by this component is hovered.
|
|
58
69
|
*/
|
|
59
|
-
onHover?:
|
|
70
|
+
onHover?: useLayerProps['onHover'];
|
|
60
71
|
/**
|
|
61
72
|
* Click event handler that is executed whenever a geometry rendered by this component is clicked.
|
|
62
73
|
*/
|
|
63
|
-
onClick?:
|
|
74
|
+
onClick?: useLayerProps['onClick'];
|
|
64
75
|
/**
|
|
65
76
|
* Leave event handler that is executed whenever a geometry rendered by this component is
|
|
66
77
|
* left/unhovered.
|
|
67
78
|
*/
|
|
68
|
-
onLeave?:
|
|
79
|
+
onLeave?: useLayerProps['onLeave'];
|
|
69
80
|
};
|
|
70
81
|
/**
|
|
71
|
-
* Adds source and layer
|
|
82
|
+
* Adds source and layer to display GeoJSON data on the map.
|
|
72
83
|
*
|
|
73
84
|
* @component
|
|
74
85
|
*/
|
|
@@ -1,100 +1,7 @@
|
|
|
1
|
+
import { MlGeoJsonLayerProps } from './MlGeoJsonLayer';
|
|
1
2
|
declare const storyoptions: {
|
|
2
3
|
title: string;
|
|
3
|
-
component: (props:
|
|
4
|
-
mapId?: string | undefined;
|
|
5
|
-
insertBeforeLayer?: string | undefined;
|
|
6
|
-
layerId?: string | undefined;
|
|
7
|
-
geojson: import("@turf/turf").Feature<import("@turf/turf").Geometry | import("@turf/turf").GeometryCollection, import("@turf/turf").Properties> | import("@turf/turf").FeatureCollection<import("@turf/turf").Geometry | import("@turf/turf").GeometryCollection, import("@turf/turf").Properties> | undefined;
|
|
8
|
-
type?: "circle" | "line" | "fill" | undefined;
|
|
9
|
-
paint?: {
|
|
10
|
-
"circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
11
|
-
"circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
12
|
-
"circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
13
|
-
"circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
14
|
-
"circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
15
|
-
"circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
16
|
-
"circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
17
|
-
"circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
18
|
-
"circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
19
|
-
"circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
20
|
-
"circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
21
|
-
} | {
|
|
22
|
-
"fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean> | undefined;
|
|
23
|
-
"fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
24
|
-
"fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
25
|
-
"fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
26
|
-
"fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
27
|
-
"fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
28
|
-
"fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
29
|
-
} | {
|
|
30
|
-
"line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
31
|
-
"line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
32
|
-
"line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
33
|
-
"line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
34
|
-
"line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
35
|
-
"line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
36
|
-
"line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
37
|
-
"line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
38
|
-
"line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<number[]> | undefined;
|
|
39
|
-
"line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
40
|
-
"line-gradient"?: import("maplibre-gl").ExpressionSpecification | undefined;
|
|
41
|
-
} | undefined;
|
|
42
|
-
layout?: {
|
|
43
|
-
"circle-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
44
|
-
visibility?: "none" | "visible" | undefined;
|
|
45
|
-
} | {
|
|
46
|
-
"fill-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
47
|
-
visibility?: "none" | "visible" | undefined;
|
|
48
|
-
} | {
|
|
49
|
-
"line-cap"?: import("maplibre-gl").PropertyValueSpecification<"square" | "round" | "butt"> | undefined;
|
|
50
|
-
"line-join"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<"round" | "bevel" | "miter"> | undefined;
|
|
51
|
-
"line-miter-limit"?: import("maplibre-gl").PropertyValueSpecification<number> | undefined;
|
|
52
|
-
"line-round-limit"?: import("maplibre-gl").PropertyValueSpecification<number> | undefined;
|
|
53
|
-
"line-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
54
|
-
visibility?: "none" | "visible" | undefined;
|
|
55
|
-
} | undefined;
|
|
56
|
-
options?: import("maplibre-gl").CircleLayerSpecification | import("maplibre-gl").FillLayerSpecification | import("maplibre-gl").LineLayerSpecification | undefined;
|
|
57
|
-
defaultPaintOverrides?: {
|
|
58
|
-
circle?: {
|
|
59
|
-
"circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
60
|
-
"circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
61
|
-
"circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
62
|
-
"circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
63
|
-
"circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
64
|
-
"circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
65
|
-
"circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
66
|
-
"circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
67
|
-
"circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
68
|
-
"circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
69
|
-
"circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
70
|
-
} | undefined;
|
|
71
|
-
fill?: {
|
|
72
|
-
"fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean> | undefined;
|
|
73
|
-
"fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
74
|
-
"fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
75
|
-
"fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
76
|
-
"fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
77
|
-
"fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
78
|
-
"fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
79
|
-
} | undefined;
|
|
80
|
-
line?: {
|
|
81
|
-
"line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
82
|
-
"line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
83
|
-
"line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
|
|
84
|
-
"line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
|
|
85
|
-
"line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
86
|
-
"line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
87
|
-
"line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
88
|
-
"line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
|
|
89
|
-
"line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<number[]> | undefined;
|
|
90
|
-
"line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
|
|
91
|
-
"line-gradient"?: import("maplibre-gl").ExpressionSpecification | undefined;
|
|
92
|
-
} | undefined;
|
|
93
|
-
} | undefined;
|
|
94
|
-
onHover?: import("maplibre-gl").MapLayerMouseEvent | undefined;
|
|
95
|
-
onClick?: import("maplibre-gl").MapLayerMouseEvent | undefined;
|
|
96
|
-
onLeave?: import("maplibre-gl").MapLayerMouseEvent | undefined;
|
|
97
|
-
}) => JSX.Element;
|
|
4
|
+
component: (props: MlGeoJsonLayerProps) => JSX.Element;
|
|
98
5
|
argTypes: {};
|
|
99
6
|
decorators: ((Story: any) => JSX.Element)[];
|
|
100
7
|
};
|
|
@@ -102,3 +9,5 @@ export default storyoptions;
|
|
|
102
9
|
export declare const Linestring: any;
|
|
103
10
|
export declare const Polygon: any;
|
|
104
11
|
export declare const DefaultPaintOverrides: any;
|
|
12
|
+
export declare const HeatMapEarthquakes: any;
|
|
13
|
+
export declare const CircleMapWheregroupLocations: any;
|
|
@@ -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;
|