@mapcomponents/react-maplibre 0.1.48 → 0.1.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/node_version_test.yml +2 -1
- package/CHANGELOG.md +22 -1
- package/README.md +61 -150
- package/coverage/clover.xml +269 -246
- package/coverage/coverage-final.json +10 -9
- package/coverage/lcov-report/index.html +49 -34
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +25 -25
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
- package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +343 -0
- package/coverage/lcov-report/src/components/MlCenterPosition/index.html +116 -0
- package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
- package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +69 -63
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +18 -18
- 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/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +26 -11
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
- package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +106 -34
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +15 -15
- 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/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +22 -19
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
- package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
- 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 +15 -15
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +78 -69
- package/coverage/lcov-report/src/hooks/useMap.ts.html +25 -25
- package/coverage/lcov-report/src/hooks/useMapState.ts.html +28 -28
- package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +1 -1
- package/coverage/lcov.info +544 -494
- package/dist/components/MapLibreMap/MapLibreMap.d.ts +31 -0
- package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +15 -0
- package/dist/components/MapLibreMap/MapLibreMap.test.d.ts +1 -0
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +76 -0
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.test.d.ts +1 -0
- package/dist/components/MlBasicComponent.d.ts +5 -0
- package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +50 -0
- package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +17 -0
- package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +22 -0
- package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +10 -0
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +21 -0
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +10 -0
- package/dist/components/MlCreatePdfButton/lib/createPdf.d.ts +2 -0
- package/dist/components/MlCreatePdfButton/lib/nominatimMap.d.ts +2 -0
- package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +35 -0
- package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +15 -0
- package/dist/components/MlFeatureEditor/MlFeatureEditor.test.d.ts +1 -0
- package/dist/components/MlFeatureEditor/custom-direct-select-mode.d.ts +37 -0
- package/dist/components/MlFeatureEditor/custom-polygon-mode.d.ts +16 -0
- package/dist/components/MlFeatureEditor/custom-select-mode.d.ts +37 -0
- package/dist/components/MlFeatureEditor/lib/common_selectors.d.ts +11 -0
- package/dist/components/MlFeatureEditor/lib/constants.d.ts +85 -0
- package/dist/components/MlFeatureEditor/lib/constrain_feature_movement.d.ts +2 -0
- package/dist/components/MlFeatureEditor/lib/create_midpoint.d.ts +15 -0
- package/dist/components/MlFeatureEditor/lib/create_supplementary_points.d.ts +2 -0
- package/dist/components/MlFeatureEditor/lib/create_vertex.d.ts +13 -0
- package/dist/components/MlFeatureEditor/lib/double_click_zoom.d.ts +7 -0
- package/dist/components/MlFeatureEditor/lib/euclidean_distance.d.ts +5 -0
- package/dist/components/MlFeatureEditor/lib/features_at.d.ts +7 -0
- package/dist/components/MlFeatureEditor/lib/get_features_and_set_cursor.d.ts +1 -0
- package/dist/components/MlFeatureEditor/lib/is_click.d.ts +1 -0
- package/dist/components/MlFeatureEditor/lib/is_event_at_coordinates.d.ts +6 -0
- package/dist/components/MlFeatureEditor/lib/is_tap.d.ts +3 -0
- package/dist/components/MlFeatureEditor/lib/map_event_to_bounding_box.d.ts +12 -0
- package/dist/components/MlFeatureEditor/lib/mode_handler.d.ts +24 -0
- package/dist/components/MlFeatureEditor/lib/mouse_event_point.d.ts +11 -0
- package/dist/components/MlFeatureEditor/lib/move_features.d.ts +2 -0
- package/dist/components/MlFeatureEditor/lib/sort_features.d.ts +2 -0
- package/dist/components/MlFeatureEditor/lib/string_set.d.ts +21 -0
- package/dist/components/MlFeatureEditor/lib/string_sets_are_equal.d.ts +5 -0
- package/dist/components/MlFeatureEditor/lib/theme.d.ts +88 -0
- package/dist/components/MlFeatureEditor/lib/to_dense_array.d.ts +12 -0
- package/dist/components/MlFeatureEditor/lib/utils.d.ts +10 -0
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +61 -0
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +10 -0
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.test.d.ts +1 -0
- package/dist/components/MlFollowGps/MlFollowGps.d.ts +80 -0
- package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +10 -0
- package/dist/components/MlFollowGps/MlFollowGps.test.d.ts +1 -0
- package/dist/components/MlGPXViewer/MlGPXViewer.d.ts +29 -0
- package/dist/components/MlGPXViewer/MlGPXViewer.stories.d.ts +16 -0
- package/dist/components/MlGPXViewer/MlGPXViewer.test.d.ts +1 -0
- package/dist/components/MlGPXViewer/gpxConverter.d.ts +11 -0
- package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +10 -0
- package/dist/components/MlGPXViewer/util/GeoJsonProvider.d.ts +4 -0
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +76 -0
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +12 -0
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.test.d.ts +1 -0
- package/dist/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +2 -0
- package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +2 -0
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +29 -0
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +10 -0
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.test.d.ts +1 -0
- package/dist/components/MlLayer/MlLayer.d.ts +26 -0
- package/dist/components/MlLayer/MlLayer.stories.d.ts +10 -0
- package/dist/components/MlLayer/MlLayer.test.d.ts +1 -0
- package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +27 -0
- package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +10 -0
- package/dist/components/MlLayerMagnify/MlLayerMagnify.test.d.ts +1 -0
- package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +16 -0
- package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +11 -0
- package/dist/components/MlLayerSwipe/MlLayerSwipe.test.d.ts +1 -0
- package/dist/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +30 -0
- package/dist/components/MlLayerSwitcher/MlLayerSwitcher.stories.d.ts +13 -0
- package/dist/components/MlLayerSwitcher/components/LayerBox.d.ts +6 -0
- package/dist/components/MlMarker/MlMarker.d.ts +33 -0
- package/dist/components/MlMarker/MlMarker.stories.d.ts +9 -0
- package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +20 -0
- package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +11 -0
- package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +47 -0
- package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +10 -0
- package/dist/components/MlNavigationCompass/MlNavigationCompass.test.d.ts +1 -0
- package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +31 -0
- package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +13 -0
- package/dist/components/MlOsmLayer/MlOsmLayer.d.ts +18 -0
- package/dist/components/MlOsmLayer/MlOsmLayer.stories_.d.ts +16 -0
- package/dist/components/MlOsmLayer/MlOsmLayer.test.d.ts +1 -0
- package/dist/components/MlScaleReference/MlScaleReference.d.ts +2 -0
- package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +14 -0
- package/dist/components/MlShareMapState/MlShareMapState.d.ts +22 -0
- package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +10 -0
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +20 -0
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +16 -0
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.d.ts +1 -0
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +15 -0
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +16 -0
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.test.d.ts +1 -0
- package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +17 -0
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +73 -0
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +13 -0
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.test.d.ts +1 -0
- package/dist/components/MlTransitionGeoJsonLayer/util/transitionFunctions.d.ts +2 -0
- package/dist/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +22 -0
- package/dist/components/MlUseMapDebugger/MlUseMapDebugger.stories.d.ts +13 -0
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +37 -0
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.stories.d.ts +13 -0
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.test.d.ts +1 -0
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +22 -0
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +13 -0
- package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +100 -0
- package/dist/components/MlWmsLayer/MlWmsLayer.stories.d.ts +13 -0
- package/dist/components/MlWmsLayer/MlWmsLayer.test.d.ts +1 -0
- package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +48 -0
- package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +13 -0
- package/dist/contexts/MapComponentsProvider.test.d.ts +1 -0
- package/dist/contexts/MapContext.d.ts +13 -0
- package/dist/contexts/SimpleDataContext.d.ts +4 -0
- package/dist/contexts/SimpleDataProvider.d.ts +8 -0
- package/dist/contexts/SimpleDataProvider.test.d.ts +1 -0
- package/dist/custom.d.d.ts +22 -0
- package/dist/decorators/MapContextDecorator.d.ts +2 -0
- package/dist/decorators/MultiMapContextDecorator.d.ts +2 -0
- package/dist/hooks/useLayer.d.ts +26 -0
- package/dist/hooks/useLayer.test.d.ts +1 -0
- package/dist/hooks/useMap.d.ts +14 -0
- package/dist/hooks/useMapState.d.ts +62 -0
- package/dist/hooks/useMapState.stories.d.ts +14 -0
- package/dist/hooks/useWms.d.ts +18 -0
- package/dist/index.d.ts +32 -0
- package/dist/index.esm.js +96 -33
- package/dist/index.esm.js.map +1 -1
- package/dist/setupTests.d.ts +12 -0
- package/dist/stories/components/Readme.d.ts +2 -0
- package/dist/ui_components/ImageLoader.d.ts +2 -0
- package/dist/ui_components/Legend.d.ts +1 -0
- package/dist/ui_components/LoadingOverlay.d.ts +2 -0
- package/dist/ui_components/LoadingOverlayContext.d.ts +11 -0
- package/dist/ui_components/Sidebar.d.ts +1 -0
- package/dist/ui_components/Tooltip.d.ts +1 -0
- package/dist/ui_components/TopToolbar.d.ts +1 -0
- package/dist/util/index.d.ts +3 -0
- package/dist/util/layerRemovalTest.d.ts +2 -0
- package/dist/util/sourceRemovalTest.d.ts +2 -0
- package/package.json +2 -1
- package/scripts/create-map-component.sh +2 -2
- package/src/components/MapLibreMap/MapLibreMap.tsx +1 -1
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +4 -3
- package/src/components/MlCenterPosition/MlCenterPosition.doc.de.md +3 -0
- package/src/components/MlCenterPosition/MlCenterPosition.meta_.json +15 -0
- package/src/components/MlCenterPosition/MlCenterPosition.stories.js +21 -0
- package/src/components/MlCenterPosition/MlCenterPosition.tsx +86 -0
- package/src/components/MlFeatureEditor/MlFeatureEditor.stories.js +1 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.test.js +3 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +37 -35
- package/src/components/MlFeatureEditor/lib/utils.js +1 -2
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +14 -9
- package/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.ts +2 -1
- package/src/components/MlNavigationTools/MlNavigationTools.stories.js +3 -2
- package/src/components/MlNavigationTools/MlNavigationTools.tsx +44 -20
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +18 -17
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +1 -1
- package/src/hooks/useLayer.test.js +205 -0
- package/src/hooks/useLayer.ts +11 -8
- package/tsconfig.json +35 -7
- package/docs-build/0.20735a16c2ad9677fe7d.manager.bundle.js +0 -1
- package/docs-build/0.968bdc5f.iframe.bundle.js +0 -2
- package/docs-build/0.968bdc5f.iframe.bundle.js.map +0 -1
- package/docs-build/1.3530bc86.iframe.bundle.js +0 -10
- package/docs-build/1.3530bc86.iframe.bundle.js.map +0 -1
- package/docs-build/17.c96fb6bc.iframe.bundle.js +0 -2
- package/docs-build/17.c96fb6bc.iframe.bundle.js.map +0 -1
- package/docs-build/18.0947f810.iframe.bundle.js +0 -17
- package/docs-build/18.0947f810.iframe.bundle.js.map +0 -1
- package/docs-build/19.44204e5a.iframe.bundle.js +0 -14
- package/docs-build/19.44204e5a.iframe.bundle.js.map +0 -1
- package/docs-build/2.c62e9630.iframe.bundle.js +0 -2
- package/docs-build/2.c62e9630.iframe.bundle.js.map +0 -1
- package/docs-build/20.50a2ad76.iframe.bundle.js +0 -2
- package/docs-build/20.50a2ad76.iframe.bundle.js.map +0 -1
- package/docs-build/21.ce55b70e.iframe.bundle.js +0 -4
- package/docs-build/21.ce55b70e.iframe.bundle.js.map +0 -1
- package/docs-build/22.639c6bb4.iframe.bundle.js +0 -22
- package/docs-build/22.639c6bb4.iframe.bundle.js.map +0 -1
- package/docs-build/3.afb0e0a5.iframe.bundle.js +0 -2
- package/docs-build/3.afb0e0a5.iframe.bundle.js.map +0 -1
- package/docs-build/4.8ac31bba1926f4f011b0.manager.bundle.js +0 -2
- package/docs-build/4.8ac31bba1926f4f011b0.manager.bundle.js.LICENSE.txt +0 -8
- package/docs-build/5.daf044a6c0f55d839078.manager.bundle.js +0 -1
- package/docs-build/6.99fba2cf6af0473f8209.manager.bundle.js +0 -2
- package/docs-build/6.99fba2cf6af0473f8209.manager.bundle.js.LICENSE.txt +0 -12
- package/docs-build/7.b6a48b90f61cb575c2e4.manager.bundle.js +0 -1
- package/docs-build/8.50518a5391398d9d5812.manager.bundle.js +0 -1
- package/docs-build/assets/3D/godzilla_simple.glb +0 -0
- package/docs-build/assets/dop.png +0 -0
- package/docs-build/assets/historic.png +0 -0
- package/docs-build/assets/marker.png +0 -0
- package/docs-build/assets/osm.png +0 -0
- package/docs-build/assets/sample.gpx +0 -716
- package/docs-build/catalogue/.gitkeep +0 -0
- package/docs-build/catalogue/mc_meta.json +0 -1
- package/docs-build/favicon.ico +0 -0
- package/docs-build/iframe.html +0 -348
- package/docs-build/index.html +0 -59
- package/docs-build/logo.png +0 -0
- package/docs-build/main.ef9704b1252e8efa56a0.manager.bundle.js +0 -1
- package/docs-build/main~24120820.e956ad2c.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.e956ad2c.iframe.bundle.js.map +0 -1
- package/docs-build/manifest.json +0 -25
- package/docs-build/robots.txt +0 -3
- package/docs-build/runtime~main.6e6ed7dc9ea4785ef286.manager.bundle.js +0 -1
- package/docs-build/static/media/mapcomponents_logo.98b01a05.png +0 -0
- package/docs-build/static/media/wg-marker.bf3eeb2d.png +0 -0
- package/docs-build/thumbnails/MapLibreMap.png +0 -0
- package/docs-build/thumbnails/MlCameraFollowPath.png +0 -0
- package/docs-build/thumbnails/MlCreatePdfButton.png +0 -0
- package/docs-build/thumbnails/MlDeckGlLayer.png +0 -0
- package/docs-build/thumbnails/MlDeckGlTerrainLayer.png +0 -0
- package/docs-build/thumbnails/MlDemoDashboard.png +0 -0
- package/docs-build/thumbnails/MlFeatureEditor.png +0 -0
- package/docs-build/thumbnails/MlFillExtrusionLayer.png +0 -0
- package/docs-build/thumbnails/MlFollowGps.png +0 -0
- package/docs-build/thumbnails/MlGPXViewer.png +0 -0
- package/docs-build/thumbnails/MlGeoJsonLayer.png +0 -0
- package/docs-build/thumbnails/MlHillshadeLayer.png +0 -0
- package/docs-build/thumbnails/MlIconLayer.png +0 -0
- package/docs-build/thumbnails/MlLaermkarte.png +0 -0
- package/docs-build/thumbnails/MlLayerMagnify.png +0 -0
- package/docs-build/thumbnails/MlLayerSwipe.png +0 -0
- package/docs-build/thumbnails/MlMapDrawTools.png +0 -0
- package/docs-build/thumbnails/MlMeasureTool.png +0 -0
- package/docs-build/thumbnails/MlMobilerImker.png +0 -0
- package/docs-build/thumbnails/MlNavigationCompass.png +0 -0
- package/docs-build/thumbnails/MlNavigationTools.png +0 -0
- package/docs-build/thumbnails/MlOsmLayer.png +0 -0
- package/docs-build/thumbnails/MlScaleReference.png +0 -0
- package/docs-build/thumbnails/MlSpatialElevationProfile.png +0 -0
- package/docs-build/thumbnails/MlThreeJsLayer.png +0 -0
- package/docs-build/thumbnails/MlTransitionGeoJsonLayer.png +0 -0
- package/docs-build/thumbnails/MlVectorTileLayer.png +0 -0
- package/docs-build/thumbnails/MlWanderApp.png +0 -0
- package/docs-build/thumbnails/MlWmsLayer.png +0 -0
- package/docs-build/thumbnails/MlWmsLoader.png +0 -0
- package/docs-build/vendors~main.4b570b3072ba06ee44b5.manager.bundle.js +0 -2
- package/docs-build/vendors~main.4b570b3072ba06ee44b5.manager.bundle.js.LICENSE.txt +0 -104
- package/docs-build/vendors~main~0ad7406a.834c9ace.iframe.bundle.js +0 -8
- package/docs-build/vendors~main~0ad7406a.834c9ace.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.19d97527.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~41a6ab2c.19d97527.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~52589227.cebbe724.iframe.bundle.js +0 -8
- package/docs-build/vendors~main~52589227.cebbe724.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~73914085.2e61c0dc.iframe.bundle.js +0 -293
- package/docs-build/vendors~main~73914085.2e61c0dc.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.32356887.iframe.bundle.js +0 -7
- package/docs-build/vendors~main~9c5b28f6.32356887.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js +0 -21
- package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b8f44717.8669cfb8.iframe.bundle.js +0 -89
- package/docs-build/vendors~main~b8f44717.8669cfb8.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.2a2025c3.iframe.bundle.js +0 -63
- package/docs-build/vendors~main~b9cf3951.2a2025c3.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~f420d588.3481b43e.iframe.bundle.js +0 -107
- package/docs-build/vendors~main~f420d588.3481b43e.iframe.bundle.js.map +0 -1
|
@@ -169,7 +169,17 @@
|
|
|
169
169
|
<a name='L104'></a><a href='#L104'>104</a>
|
|
170
170
|
<a name='L105'></a><a href='#L105'>105</a>
|
|
171
171
|
<a name='L106'></a><a href='#L106'>106</a>
|
|
172
|
-
<a name='L107'></a><a href='#L107'>107</a
|
|
172
|
+
<a name='L107'></a><a href='#L107'>107</a>
|
|
173
|
+
<a name='L108'></a><a href='#L108'>108</a>
|
|
174
|
+
<a name='L109'></a><a href='#L109'>109</a>
|
|
175
|
+
<a name='L110'></a><a href='#L110'>110</a>
|
|
176
|
+
<a name='L111'></a><a href='#L111'>111</a>
|
|
177
|
+
<a name='L112'></a><a href='#L112'>112</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
|
180
|
+
<span class="cline-any cline-neutral"> </span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
|
173
183
|
<span class="cline-any cline-neutral"> </span>
|
|
174
184
|
<span class="cline-any cline-neutral"> </span>
|
|
175
185
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -285,6 +295,9 @@ import getDefaultPaintPropsByType from "./util/getDefaultPaintPropsByType";
|
|
|
285
295
|
import getDefaulLayerTypeByGeometry from "./util/getDefaultLayerTypeByGeometry";
|
|
286
296
|
import { Feature, FeatureCollection } from "@turf/turf";
|
|
287
297
|
|
|
298
|
+
|
|
299
|
+
import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification,MapLayerMouseEvent, LayerSpecification } from "maplibre-gl";
|
|
300
|
+
|
|
288
301
|
type MlGeoJsonLayerProps = {
|
|
289
302
|
/**
|
|
290
303
|
* Id of the target MapLibre instance in mapContext
|
|
@@ -293,6 +306,8 @@ type MlGeoJsonLayerProps = {
|
|
|
293
306
|
/**
|
|
294
307
|
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
295
308
|
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
309
|
+
* This layer will not be added to the maplibre-gl instance until a layer with an
|
|
310
|
+
* id that matches the value of insertBeforeLayer is created.
|
|
296
311
|
*/
|
|
297
312
|
insertBeforeLayer?: string;
|
|
298
313
|
/**
|
|
@@ -307,7 +322,7 @@ type MlGeoJsonLayerProps = {
|
|
|
307
322
|
* Type of the layer that will be added to the MapLibre instance.
|
|
308
323
|
* Possible values: "line", "circle", "fill"
|
|
309
324
|
*/
|
|
310
|
-
type?:
|
|
325
|
+
type?: "fill" | "line" | "circle";
|
|
311
326
|
/**
|
|
312
327
|
* Paint property object, that is passed to the addLayer call.
|
|
313
328
|
* Possible props depend on the layer type.
|
|
@@ -315,7 +330,7 @@ type MlGeoJsonLayerProps = {
|
|
|
315
330
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
316
331
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
317
332
|
*/
|
|
318
|
-
paint?:
|
|
333
|
+
paint?: CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
319
334
|
/**
|
|
320
335
|
* Layout property object, that is passed to the addLayer call.
|
|
321
336
|
* Possible props depend on the layer type.
|
|
@@ -323,28 +338,28 @@ type MlGeoJsonLayerProps = {
|
|
|
323
338
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
|
|
324
339
|
* https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
|
|
325
340
|
*/
|
|
326
|
-
layout?:
|
|
341
|
+
layout?: CircleLayerSpecification['layout'] | FillLayerSpecification['layout'] | LineLayerSpecification['layout'];
|
|
327
342
|
/**
|
|
328
343
|
* Javascript object that is spread into the addLayer commands first parameter.
|
|
329
344
|
*/
|
|
330
|
-
options?:
|
|
345
|
+
options?: CircleLayerSpecification | FillLayerSpecification | LineLayerSpecification;
|
|
331
346
|
/**
|
|
332
347
|
* Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
|
|
333
348
|
*/
|
|
334
|
-
defaultPaintOverrides?:
|
|
349
|
+
defaultPaintOverrides?: { circle?: CircleLayerSpecification['paint'], fill?: FillLayerSpecification['paint'], line?: LineLayerSpecification['paint'] };
|
|
335
350
|
/**
|
|
336
351
|
* Hover event handler that is executed whenever a geometry rendered by this component is hovered.
|
|
337
352
|
*/
|
|
338
|
-
onHover?:
|
|
353
|
+
onHover?: MapLayerMouseEvent;
|
|
339
354
|
/**
|
|
340
355
|
* Click event handler that is executed whenever a geometry rendered by this component is clicked.
|
|
341
356
|
*/
|
|
342
|
-
onClick?:
|
|
357
|
+
onClick?: MapLayerMouseEvent;
|
|
343
358
|
/**
|
|
344
359
|
* Leave event handler that is executed whenever a geometry rendered by this component is
|
|
345
360
|
* left/unhovered.
|
|
346
361
|
*/
|
|
347
|
-
onLeave?:
|
|
362
|
+
onLeave?: MapLayerMouseEvent;
|
|
348
363
|
}
|
|
349
364
|
|
|
350
365
|
/**
|
|
@@ -368,7 +383,7 @@ const MlGeoJsonLayer = (props: MlGeoJsonLayerProps) => {
|
|
|
368
383
|
),
|
|
369
384
|
layout: props.layout || {},
|
|
370
385
|
...props.options,
|
|
371
|
-
type: layerType,
|
|
386
|
+
type: layerType as LayerSpecification['type'],
|
|
372
387
|
},
|
|
373
388
|
insertBeforeLayer: props.insertBeforeLayer,
|
|
374
389
|
onHover: props.onHover,
|
|
@@ -388,7 +403,7 @@ export default MlGeoJsonLayer;
|
|
|
388
403
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
389
404
|
Code coverage generated by
|
|
390
405
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
391
|
-
at
|
|
406
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
392
407
|
</div>
|
|
393
408
|
<script src="../../../prettify.js"></script>
|
|
394
409
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -592,7 +592,7 @@ export default MlImageMarkerLayer;
|
|
|
592
592
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
593
593
|
Code coverage generated by
|
|
594
594
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
595
|
-
at
|
|
595
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
596
596
|
</div>
|
|
597
597
|
<script src="../../../prettify.js"></script>
|
|
598
598
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -214,7 +214,7 @@ export default MlLayer;
|
|
|
214
214
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
215
215
|
Code coverage generated by
|
|
216
216
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
217
|
-
at
|
|
217
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
218
218
|
</div>
|
|
219
219
|
<script src="../../../prettify.js"></script>
|
|
220
220
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -736,7 +736,7 @@ export default MlLayerMagnify;
|
|
|
736
736
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
737
737
|
Code coverage generated by
|
|
738
738
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
739
|
-
at
|
|
739
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
740
740
|
</div>
|
|
741
741
|
<script src="../../../prettify.js"></script>
|
|
742
742
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -508,7 +508,7 @@ export default MlLayerSwipe;
|
|
|
508
508
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
509
509
|
Code coverage generated by
|
|
510
510
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
511
|
-
at
|
|
511
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
512
512
|
</div>
|
|
513
513
|
<script src="../../../prettify.js"></script>
|
|
514
514
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -721,7 +721,7 @@ export default MlLayerSwitcher;
|
|
|
721
721
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
722
722
|
Code coverage generated by
|
|
723
723
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
724
|
-
at
|
|
724
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
725
725
|
</div>
|
|
726
726
|
<script src="../../../prettify.js"></script>
|
|
727
727
|
<script>
|
|
@@ -292,7 +292,7 @@ export default LayerBox;
|
|
|
292
292
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
293
293
|
Code coverage generated by
|
|
294
294
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
295
|
-
at
|
|
295
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
296
296
|
</div>
|
|
297
297
|
<script src="../../../../prettify.js"></script>
|
|
298
298
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -490,7 +490,7 @@ export default MlMarker;
|
|
|
490
490
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
491
491
|
Code coverage generated by
|
|
492
492
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
493
|
-
at
|
|
493
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
494
494
|
</div>
|
|
495
495
|
<script src="../../../prettify.js"></script>
|
|
496
496
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -250,7 +250,7 @@ export default MlMeasureTool;
|
|
|
250
250
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
251
251
|
Code coverage generated by
|
|
252
252
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
253
|
-
at
|
|
253
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
254
254
|
</div>
|
|
255
255
|
<script src="../../../prettify.js"></script>
|
|
256
256
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html
CHANGED
|
@@ -748,7 +748,7 @@ export default MlNavigationCompass;
|
|
|
748
748
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
749
749
|
Code coverage generated by
|
|
750
750
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
751
|
-
at
|
|
751
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
752
752
|
</div>
|
|
753
753
|
<script src="../../../prettify.js"></script>
|
|
754
754
|
<script>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">5.88% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>2/34</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
33
|
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>0/
|
|
35
|
+
<span class='fraction'>0/44</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
40
|
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>0/
|
|
42
|
+
<span class='fraction'>0/8</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">6.89% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>2/29</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -202,7 +202,47 @@
|
|
|
202
202
|
<a name='L137'></a><a href='#L137'>137</a>
|
|
203
203
|
<a name='L138'></a><a href='#L138'>138</a>
|
|
204
204
|
<a name='L139'></a><a href='#L139'>139</a>
|
|
205
|
-
<a name='L140'></a><a href='#L140'>140</a
|
|
205
|
+
<a name='L140'></a><a href='#L140'>140</a>
|
|
206
|
+
<a name='L141'></a><a href='#L141'>141</a>
|
|
207
|
+
<a name='L142'></a><a href='#L142'>142</a>
|
|
208
|
+
<a name='L143'></a><a href='#L143'>143</a>
|
|
209
|
+
<a name='L144'></a><a href='#L144'>144</a>
|
|
210
|
+
<a name='L145'></a><a href='#L145'>145</a>
|
|
211
|
+
<a name='L146'></a><a href='#L146'>146</a>
|
|
212
|
+
<a name='L147'></a><a href='#L147'>147</a>
|
|
213
|
+
<a name='L148'></a><a href='#L148'>148</a>
|
|
214
|
+
<a name='L149'></a><a href='#L149'>149</a>
|
|
215
|
+
<a name='L150'></a><a href='#L150'>150</a>
|
|
216
|
+
<a name='L151'></a><a href='#L151'>151</a>
|
|
217
|
+
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
|
+
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
|
+
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
+
<a name='L164'></a><a href='#L164'>164</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
230
|
+
<span class="cline-any cline-neutral"> </span>
|
|
231
|
+
<span class="cline-any cline-neutral"> </span>
|
|
232
|
+
<span class="cline-any cline-neutral"> </span>
|
|
233
|
+
<span class="cline-any cline-neutral"> </span>
|
|
234
|
+
<span class="cline-any cline-neutral"> </span>
|
|
235
|
+
<span class="cline-any cline-neutral"> </span>
|
|
236
|
+
<span class="cline-any cline-neutral"> </span>
|
|
237
|
+
<span class="cline-any cline-neutral"> </span>
|
|
238
|
+
<span class="cline-any cline-neutral"> </span>
|
|
239
|
+
<span class="cline-any cline-neutral"> </span>
|
|
240
|
+
<span class="cline-any cline-neutral"> </span>
|
|
241
|
+
<span class="cline-any cline-neutral"> </span>
|
|
242
|
+
<span class="cline-any cline-neutral"> </span>
|
|
243
|
+
<span class="cline-any cline-neutral"> </span>
|
|
244
|
+
<span class="cline-any cline-neutral"> </span>
|
|
245
|
+
<span class="cline-any cline-neutral"> </span>
|
|
206
246
|
<span class="cline-any cline-neutral"> </span>
|
|
207
247
|
<span class="cline-any cline-neutral"> </span>
|
|
208
248
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -250,21 +290,22 @@
|
|
|
250
290
|
<span class="cline-any cline-no"> </span>
|
|
251
291
|
<span class="cline-any cline-neutral"> </span>
|
|
252
292
|
<span class="cline-any cline-no"> </span>
|
|
253
|
-
<span class="cline-any cline-
|
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
|
254
294
|
<span class="cline-any cline-neutral"> </span>
|
|
255
295
|
<span class="cline-any cline-no"> </span>
|
|
256
296
|
<span class="cline-any cline-neutral"> </span>
|
|
257
297
|
<span class="cline-any cline-no"> </span>
|
|
258
298
|
<span class="cline-any cline-neutral"> </span>
|
|
259
299
|
<span class="cline-any cline-neutral"> </span>
|
|
260
|
-
<span class="cline-any cline-no"> </span>
|
|
261
|
-
<span class="cline-any cline-no"> </span>
|
|
262
300
|
<span class="cline-any cline-neutral"> </span>
|
|
263
301
|
<span class="cline-any cline-no"> </span>
|
|
264
302
|
<span class="cline-any cline-neutral"> </span>
|
|
265
303
|
<span class="cline-any cline-neutral"> </span>
|
|
304
|
+
<span class="cline-any cline-no"> </span>
|
|
305
|
+
<span class="cline-any cline-no"> </span>
|
|
266
306
|
<span class="cline-any cline-neutral"> </span>
|
|
267
307
|
<span class="cline-any cline-no"> </span>
|
|
308
|
+
<span class="cline-any cline-no"> </span>
|
|
268
309
|
<span class="cline-any cline-neutral"> </span>
|
|
269
310
|
<span class="cline-any cline-neutral"> </span>
|
|
270
311
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -272,9 +313,6 @@
|
|
|
272
313
|
<span class="cline-any cline-no"> </span>
|
|
273
314
|
<span class="cline-any cline-neutral"> </span>
|
|
274
315
|
<span class="cline-any cline-no"> </span>
|
|
275
|
-
<span class="cline-any cline-neutral"> </span>
|
|
276
|
-
<span class="cline-any cline-neutral"> </span>
|
|
277
|
-
<span class="cline-any cline-neutral"> </span>
|
|
278
316
|
<span class="cline-any cline-no"> </span>
|
|
279
317
|
<span class="cline-any cline-neutral"> </span>
|
|
280
318
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -315,6 +353,13 @@
|
|
|
315
353
|
<span class="cline-any cline-neutral"> </span>
|
|
316
354
|
<span class="cline-any cline-neutral"> </span>
|
|
317
355
|
<span class="cline-any cline-neutral"> </span>
|
|
356
|
+
<span class="cline-any cline-neutral"> </span>
|
|
357
|
+
<span class="cline-any cline-neutral"> </span>
|
|
358
|
+
<span class="cline-any cline-neutral"> </span>
|
|
359
|
+
<span class="cline-any cline-neutral"> </span>
|
|
360
|
+
<span class="cline-any cline-no"> </span>
|
|
361
|
+
<span class="cline-any cline-neutral"> </span>
|
|
362
|
+
<span class="cline-any cline-neutral"> </span>
|
|
318
363
|
<span class="cline-any cline-no"> </span>
|
|
319
364
|
<span class="cline-any cline-neutral"> </span>
|
|
320
365
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -337,6 +382,9 @@
|
|
|
337
382
|
<span class="cline-any cline-neutral"> </span>
|
|
338
383
|
<span class="cline-any cline-neutral"> </span>
|
|
339
384
|
<span class="cline-any cline-neutral"> </span>
|
|
385
|
+
<span class="cline-any cline-yes">10x</span>
|
|
386
|
+
<span class="cline-any cline-neutral"> </span>
|
|
387
|
+
<span class="cline-any cline-neutral"> </span>
|
|
340
388
|
<span class="cline-any cline-neutral"> </span>
|
|
341
389
|
<span class="cline-any cline-neutral"> </span>
|
|
342
390
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -351,13 +399,29 @@ import MlNavigationCompass from "../MlNavigationCompass/MlNavigationCompass";
|
|
|
351
399
|
import MlFollowGps from "../MlFollowGps/MlFollowGps";
|
|
352
400
|
import useMediaQuery from "@mui/material/useMediaQuery";
|
|
353
401
|
import useMap from "../../hooks/useMap";
|
|
402
|
+
import MlCenterPosition from "../MlCenterPosition/MlCenterPosition";
|
|
354
403
|
|
|
355
404
|
interface MlNavigationToolsProps {
|
|
405
|
+
/**
|
|
406
|
+
* Id of the target MapLibre instance in mapContext
|
|
407
|
+
*/
|
|
356
408
|
mapId?: string;
|
|
409
|
+
/**
|
|
410
|
+
* The layerId of an existing layer this layer should be rendered visually beneath
|
|
411
|
+
* https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
|
|
412
|
+
*/
|
|
357
413
|
insertBeforeLayer?: string;
|
|
414
|
+
/**
|
|
415
|
+
* Show follow GPS button
|
|
416
|
+
*/
|
|
417
|
+
showFollowGpsButton?: boolean;
|
|
418
|
+
/**
|
|
419
|
+
* Show center on current position button
|
|
420
|
+
*/
|
|
421
|
+
showCenterLocationButton?: boolean;
|
|
358
422
|
}
|
|
359
423
|
|
|
360
|
-
|
|
424
|
+
/**
|
|
361
425
|
* @component
|
|
362
426
|
*/
|
|
363
427
|
const MlNavigationTools = <span class="fstat-no" title="function not covered" >(p</span>rops: MlNavigationToolsProps) => {
|
|
@@ -388,21 +452,22 @@ const MlNavigationTools = <span class="fstat-no" title="function not covered" >(
|
|
|
388
452
|
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
389
453
|
<span class="cstat-no" title="statement not covered" > if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
390
454
|
|
|
391
|
-
<span class="cstat-no" title="statement not covered" > mapHook.map.on(
|
|
392
|
-
|
|
455
|
+
<span class="cstat-no" title="statement not covered" > mapHook.map.on(</span>
|
|
456
|
+
"pitchend",
|
|
457
|
+
<span class="fstat-no" title="function not covered" > ()</span> => {
|
|
458
|
+
<span class="cstat-no" title="statement not covered" > if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
393
459
|
|
|
394
|
-
<span class="cstat-no" title="statement not covered" >
|
|
395
|
-
|
|
460
|
+
<span class="cstat-no" title="statement not covered" > setPitch(mapHook.map.map.getPitch());</span>
|
|
461
|
+
},
|
|
462
|
+
mapHook.componentId
|
|
463
|
+
);
|
|
396
464
|
<span class="cstat-no" title="statement not covered" > setPitch(mapHook.map.map.getPitch());</span>
|
|
397
465
|
}, [mapHook.map, props.mapId]);
|
|
398
466
|
|
|
399
467
|
const zoomIn = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
400
468
|
<span class="cstat-no" title="statement not covered" > if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
401
469
|
|
|
402
|
-
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
403
|
-
mapHook.map.map.transform._zoom + 0.5 <=
|
|
404
|
-
mapHook.map.map.transform._maxZoom
|
|
405
|
-
) {
|
|
470
|
+
<span class="cstat-no" title="statement not covered" > if (mapHook.map.map.transform._zoom + 0.5 <= mapHook.map.map.transform._maxZoom) {</span>
|
|
406
471
|
<span class="cstat-no" title="statement not covered" > mapHook.map.map.easeTo({ zoom: mapHook.map.map.transform._zoom + 0.5 });</span>
|
|
407
472
|
}
|
|
408
473
|
};
|
|
@@ -410,10 +475,7 @@ const MlNavigationTools = <span class="fstat-no" title="function not covered" >(
|
|
|
410
475
|
const zoomOut = <span class="cstat-no" title="statement not covered" ><span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
411
476
|
<span class="cstat-no" title="statement not covered" > if (!mapHook.map) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
412
477
|
|
|
413
|
-
<span class="cstat-no" title="statement not covered" > if (</span>
|
|
414
|
-
mapHook.map.map.transform._zoom - 0.5 >=
|
|
415
|
-
mapHook.map.map.transform._minZoom
|
|
416
|
-
) {
|
|
478
|
+
<span class="cstat-no" title="statement not covered" > if (mapHook.map.map.transform._zoom - 0.5 >= mapHook.map.map.transform._minZoom) {</span>
|
|
417
479
|
<span class="cstat-no" title="statement not covered" > mapHook.map.map.easeTo({ zoom: mapHook.map.map.transform._zoom - 0.5 });</span>
|
|
418
480
|
}
|
|
419
481
|
};
|
|
@@ -451,10 +513,18 @@ const MlNavigationTools = <span class="fstat-no" title="function not covered" >(
|
|
|
451
513
|
boxShadow: "0px 0px 18px rgba(0,0,0,.5)",
|
|
452
514
|
}}
|
|
453
515
|
/>
|
|
454
|
-
<Button
|
|
516
|
+
<Button
|
|
517
|
+
sx={{ ...buttonStyle, fontSize: mediaIsMobile ? "1.4em" : "1em", fontWeight: 600 }}
|
|
518
|
+
onClick={adjustPitch}
|
|
519
|
+
>
|
|
455
520
|
{pitch ? "2D" : "3D"}
|
|
456
521
|
</Button>
|
|
522
|
+
{props.showFollowGpsButton &&
|
|
457
523
|
<MlFollowGps style={{ ...(<span class="fstat-no" title="function not covered" >({</span> color, ...rest }) => <span class="cstat-no" title="statement not covered" >rest)</span>(buttonStyle) }} />
|
|
524
|
+
}
|
|
525
|
+
{props.showCenterLocationButton &&
|
|
526
|
+
<MlCenterPosition style={{ ...(<span class="fstat-no" title="function not covered" >({</span> color, ...rest }) => <span class="cstat-no" title="statement not covered" >rest)</span>(buttonStyle) }} />
|
|
527
|
+
}
|
|
458
528
|
<ButtonGroup
|
|
459
529
|
orientation="vertical"
|
|
460
530
|
sx={{
|
|
@@ -465,20 +535,22 @@ const MlNavigationTools = <span class="fstat-no" title="function not covered" >(
|
|
|
465
535
|
}}
|
|
466
536
|
>
|
|
467
537
|
<Button sx={{ ...buttonStyle, color: "#ececec" }} onClick={zoomIn}>
|
|
468
|
-
<ControlPointIcon
|
|
469
|
-
sx={{ fontSize: mediaIsMobile ? "1.5em" : "1.2em" }}
|
|
470
|
-
/>
|
|
538
|
+
<ControlPointIcon sx={{ fontSize: mediaIsMobile ? "1.5em" : "1.2em" }} />
|
|
471
539
|
</Button>
|
|
472
540
|
<Button sx={{ ...buttonStyle, color: "#ececec" }} onClick={zoomOut}>
|
|
473
|
-
<RemoveCircleOutlineIcon
|
|
474
|
-
sx={{ fontSize: mediaIsMobile ? "1.5em" : "1.2em" }}
|
|
475
|
-
/>
|
|
541
|
+
<RemoveCircleOutlineIcon sx={{ fontSize: mediaIsMobile ? "1.5em" : "1.2em" }} />
|
|
476
542
|
</Button>
|
|
477
543
|
</ButtonGroup>
|
|
478
544
|
</div>
|
|
479
545
|
);
|
|
480
546
|
};
|
|
481
547
|
|
|
548
|
+
MlNavigationTools.defaultProps = {
|
|
549
|
+
mapId: undefined,
|
|
550
|
+
showFollowGpsButton: true,
|
|
551
|
+
showCenterLocationButton: false,
|
|
552
|
+
};
|
|
553
|
+
|
|
482
554
|
export default MlNavigationTools;
|
|
483
555
|
</pre></td></tr></table></pre>
|
|
484
556
|
|
|
@@ -487,7 +559,7 @@ export default MlNavigationTools;
|
|
|
487
559
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
488
560
|
Code coverage generated by
|
|
489
561
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
490
|
-
at
|
|
562
|
+
at Tue Jul 19 2022 06:50:01 GMT+0000 (Coordinated Universal Time)
|
|
491
563
|
</div>
|
|
492
564
|
<script src="../../../prettify.js"></script>
|
|
493
565
|
<script>
|