@mapcomponents/react-maplibre 0.1.46 → 0.1.51
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 +35 -0
- package/README.md +61 -150
- package/coverage/clover.xml +233 -226
- package/coverage/coverage-final.json +9 -9
- package/coverage/lcov-report/index.html +34 -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/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 +72 -66
- 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 +103 -22
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +15 -15
- 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/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 +2 -2
- 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 +2 -2
- package/coverage/lcov-report/src/index.html +1 -1
- package/coverage/lcov-report/src/index.ts.html +5 -2
- package/coverage/lcov.info +464 -443
- 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/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 +9 -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 +66 -24
- 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/public/catalogue/mc_meta.json +1 -0
- package/src/components/MapLibreMap/MapLibreMap.tsx +1 -1
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +4 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.stories.js +1 -2
- package/src/components/MlFeatureEditor/MlFeatureEditor.test.js +3 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +40 -38
- 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/MlMeasureTool/MlMeasureTool.stories.js +68 -39
- package/src/components/MlMeasureTool/MlMeasureTool.tsx +38 -11
- package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +18 -17
- package/src/components/MlWmsLoader/MlWmsLoader.stories.js +1 -1
- package/src/components/MlWmsLoader/MlWmsLoader.tsx +1 -1
- package/src/hooks/useLayer.test.js +205 -0
- package/src/hooks/useLayer.ts +11 -8
- package/src/hooks/useWms.js +1 -1
- package/src/index.ts +1 -0
- package/tsconfig.json +35 -7
- package/docs-build/0.0ee4f98c.iframe.bundle.js +0 -2
- package/docs-build/0.0ee4f98c.iframe.bundle.js.map +0 -1
- package/docs-build/0.20735a16c2ad9677fe7d.manager.bundle.js +0 -1
- package/docs-build/1.bb3cf738.iframe.bundle.js +0 -10
- package/docs-build/1.bb3cf738.iframe.bundle.js.map +0 -1
- package/docs-build/17.97db5b3f.iframe.bundle.js +0 -2
- package/docs-build/17.97db5b3f.iframe.bundle.js.map +0 -1
- package/docs-build/18.f8d843df.iframe.bundle.js +0 -17
- package/docs-build/18.f8d843df.iframe.bundle.js.map +0 -1
- package/docs-build/19.c45e6b08.iframe.bundle.js +0 -14
- package/docs-build/19.c45e6b08.iframe.bundle.js.map +0 -1
- package/docs-build/2.42c790e4.iframe.bundle.js +0 -2
- package/docs-build/2.42c790e4.iframe.bundle.js.map +0 -1
- package/docs-build/20.120bbcfb.iframe.bundle.js +0 -2
- package/docs-build/20.120bbcfb.iframe.bundle.js.map +0 -1
- package/docs-build/21.37c885f1.iframe.bundle.js +0 -4
- package/docs-build/21.37c885f1.iframe.bundle.js.map +0 -1
- package/docs-build/22.7fbc99f4.iframe.bundle.js +0 -22
- package/docs-build/22.7fbc99f4.iframe.bundle.js.map +0 -1
- package/docs-build/3.1a37a83e.iframe.bundle.js +0 -2
- package/docs-build/3.1a37a83e.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.905c51c8.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.905c51c8.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.93aea1be.iframe.bundle.js +0 -8
- package/docs-build/vendors~main~0ad7406a.93aea1be.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~0f485567.6e7163ef.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.da377733.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~41a6ab2c.da377733.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.86178471.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~57c1f6cb.86178471.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~73914085.e2f34f8e.iframe.bundle.js +0 -293
- package/docs-build/vendors~main~73914085.e2f34f8e.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.eefa7445.iframe.bundle.js +0 -7
- package/docs-build/vendors~main~9c5b28f6.eefa7445.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.210afc21.iframe.bundle.js +0 -21
- package/docs-build/vendors~main~b5906859.210afc21.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b8f44717.7b869975.iframe.bundle.js +0 -89
- package/docs-build/vendors~main~b8f44717.7b869975.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.62d39717.iframe.bundle.js +0 -63
- package/docs-build/vendors~main~b9cf3951.62d39717.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~d939e436.394e3bc7.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js +0 -107
- package/docs-build/vendors~main~f420d588.88814a6a.iframe.bundle.js.map +0 -1
|
@@ -23,30 +23,30 @@
|
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">78.
|
|
26
|
+
<span class="strong">78.94% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>30/38</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">68% </span>
|
|
33
|
+
<span class="strong">68.96% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>20/29</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">75% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>6/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">80.55% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>29/36</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -80,17 +80,17 @@
|
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
82
|
<td class="file medium" data-value="MlFeatureEditor.tsx"><a href="MlFeatureEditor.tsx.html">MlFeatureEditor.tsx</a></td>
|
|
83
|
-
<td data-value="78.
|
|
83
|
+
<td data-value="78.94" class="pic medium">
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 78%"></div><div class="cover-empty" style="width: 22%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="78.
|
|
87
|
-
<td data-value="
|
|
88
|
-
<td data-value="68" class="pct medium">68%</td>
|
|
89
|
-
<td data-value="
|
|
90
|
-
<td data-value="
|
|
91
|
-
<td data-value="
|
|
92
|
-
<td data-value="
|
|
93
|
-
<td data-value="
|
|
86
|
+
<td data-value="78.94" class="pct medium">78.94%</td>
|
|
87
|
+
<td data-value="38" class="abs medium">30/38</td>
|
|
88
|
+
<td data-value="68.96" class="pct medium">68.96%</td>
|
|
89
|
+
<td data-value="29" class="abs medium">20/29</td>
|
|
90
|
+
<td data-value="75" class="pct medium">75%</td>
|
|
91
|
+
<td data-value="8" class="abs medium">6/8</td>
|
|
92
|
+
<td data-value="80.55" class="pct high">80.55%</td>
|
|
93
|
+
<td data-value="36" class="abs high">29/36</td>
|
|
94
94
|
</tr>
|
|
95
95
|
|
|
96
96
|
</tbody>
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
102
102
|
Code coverage generated by
|
|
103
103
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
104
|
-
at
|
|
104
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html
CHANGED
|
@@ -325,7 +325,7 @@ export default MlFillExtrusionLayer;
|
|
|
325
325
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
326
326
|
Code coverage generated by
|
|
327
327
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
328
|
-
at
|
|
328
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
329
329
|
</div>
|
|
330
330
|
<script src="../../../prettify.js"></script>
|
|
331
331
|
<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 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -763,7 +763,7 @@ export default MlFollowGps;
|
|
|
763
763
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
764
764
|
Code coverage generated by
|
|
765
765
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
766
|
-
at
|
|
766
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
767
767
|
</div>
|
|
768
768
|
<script src="../../../prettify.js"></script>
|
|
769
769
|
<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 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../../../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -1201,7 +1201,7 @@ export default MlGPXViewer;
|
|
|
1201
1201
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1202
1202
|
Code coverage generated by
|
|
1203
1203
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1204
|
-
at
|
|
1204
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
1205
1205
|
</div>
|
|
1206
1206
|
<script src="../../../prettify.js"></script>
|
|
1207
1207
|
<script>
|
|
@@ -1630,7 +1630,7 @@ export default toGeoJSON;
|
|
|
1630
1630
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
1631
1631
|
Code coverage generated by
|
|
1632
1632
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
1633
|
-
at
|
|
1633
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
1634
1634
|
</div>
|
|
1635
1635
|
<script src="../../../prettify.js"></script>
|
|
1636
1636
|
<script>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
117
117
|
Code coverage generated by
|
|
118
118
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
119
|
-
at
|
|
119
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
120
120
|
</div>
|
|
121
121
|
<script src="../../../prettify.js"></script>
|
|
122
122
|
<script>
|
|
@@ -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['layout'];
|
|
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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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 12 2022 21:19:26 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">18.18% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>2/11</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/12</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/5</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">18.18% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>2/11</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -96,7 +96,43 @@
|
|
|
96
96
|
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
97
|
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
98
|
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
-
<a name='L34'></a><a href='#L34'>34</a
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a>
|
|
100
|
+
<a name='L35'></a><a href='#L35'>35</a>
|
|
101
|
+
<a name='L36'></a><a href='#L36'>36</a>
|
|
102
|
+
<a name='L37'></a><a href='#L37'>37</a>
|
|
103
|
+
<a name='L38'></a><a href='#L38'>38</a>
|
|
104
|
+
<a name='L39'></a><a href='#L39'>39</a>
|
|
105
|
+
<a name='L40'></a><a href='#L40'>40</a>
|
|
106
|
+
<a name='L41'></a><a href='#L41'>41</a>
|
|
107
|
+
<a name='L42'></a><a href='#L42'>42</a>
|
|
108
|
+
<a name='L43'></a><a href='#L43'>43</a>
|
|
109
|
+
<a name='L44'></a><a href='#L44'>44</a>
|
|
110
|
+
<a name='L45'></a><a href='#L45'>45</a>
|
|
111
|
+
<a name='L46'></a><a href='#L46'>46</a>
|
|
112
|
+
<a name='L47'></a><a href='#L47'>47</a>
|
|
113
|
+
<a name='L48'></a><a href='#L48'>48</a>
|
|
114
|
+
<a name='L49'></a><a href='#L49'>49</a>
|
|
115
|
+
<a name='L50'></a><a href='#L50'>50</a>
|
|
116
|
+
<a name='L51'></a><a href='#L51'>51</a>
|
|
117
|
+
<a name='L52'></a><a href='#L52'>52</a>
|
|
118
|
+
<a name='L53'></a><a href='#L53'>53</a>
|
|
119
|
+
<a name='L54'></a><a href='#L54'>54</a>
|
|
120
|
+
<a name='L55'></a><a href='#L55'>55</a>
|
|
121
|
+
<a name='L56'></a><a href='#L56'>56</a>
|
|
122
|
+
<a name='L57'></a><a href='#L57'>57</a>
|
|
123
|
+
<a name='L58'></a><a href='#L58'>58</a>
|
|
124
|
+
<a name='L59'></a><a href='#L59'>59</a>
|
|
125
|
+
<a name='L60'></a><a href='#L60'>60</a>
|
|
126
|
+
<a name='L61'></a><a href='#L61'>61</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
127
|
+
<span class="cline-any cline-neutral"> </span>
|
|
128
|
+
<span class="cline-any cline-neutral"> </span>
|
|
129
|
+
<span class="cline-any cline-neutral"> </span>
|
|
130
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
|
+
<span class="cline-any cline-neutral"> </span>
|
|
132
|
+
<span class="cline-any cline-neutral"> </span>
|
|
133
|
+
<span class="cline-any cline-neutral"> </span>
|
|
134
|
+
<span class="cline-any cline-neutral"> </span>
|
|
135
|
+
<span class="cline-any cline-neutral"> </span>
|
|
100
136
|
<span class="cline-any cline-neutral"> </span>
|
|
101
137
|
<span class="cline-any cline-neutral"> </span>
|
|
102
138
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -107,12 +143,15 @@
|
|
|
107
143
|
<span class="cline-any cline-neutral"> </span>
|
|
108
144
|
<span class="cline-any cline-neutral"> </span>
|
|
109
145
|
<span class="cline-any cline-neutral"> </span>
|
|
110
|
-
<span class="cline-any cline-no"> </span>
|
|
111
146
|
<span class="cline-any cline-no"> </span>
|
|
112
147
|
<span class="cline-any cline-neutral"> </span>
|
|
148
|
+
<span class="cline-any cline-neutral"> </span>
|
|
113
149
|
<span class="cline-any cline-no"> </span>
|
|
114
150
|
<span class="cline-any cline-neutral"> </span>
|
|
115
151
|
<span class="cline-any cline-neutral"> </span>
|
|
152
|
+
<span class="cline-any cline-yes">10x</span>
|
|
153
|
+
<span class="cline-any cline-no"> </span>
|
|
154
|
+
<span class="cline-any cline-no"> </span>
|
|
116
155
|
<span class="cline-any cline-neutral"> </span>
|
|
117
156
|
<span class="cline-any cline-no"> </span>
|
|
118
157
|
<span class="cline-any cline-no"> </span>
|
|
@@ -128,8 +167,23 @@
|
|
|
128
167
|
<span class="cline-any cline-neutral"> </span>
|
|
129
168
|
<span class="cline-any cline-neutral"> </span>
|
|
130
169
|
<span class="cline-any cline-neutral"> </span>
|
|
170
|
+
<span class="cline-any cline-no"> </span>
|
|
171
|
+
<span class="cline-any cline-neutral"> </span>
|
|
172
|
+
<span class="cline-any cline-neutral"> </span>
|
|
131
173
|
<span class="cline-any cline-neutral"> </span>
|
|
132
|
-
<span class="cline-any cline-neutral"> </span
|
|
174
|
+
<span class="cline-any cline-neutral"> </span>
|
|
175
|
+
<span class="cline-any cline-neutral"> </span>
|
|
176
|
+
<span class="cline-any cline-neutral"> </span>
|
|
177
|
+
<span class="cline-any cline-neutral"> </span>
|
|
178
|
+
<span class="cline-any cline-neutral"> </span>
|
|
179
|
+
<span class="cline-any cline-neutral"> </span>
|
|
180
|
+
<span class="cline-any cline-yes">10x</span>
|
|
181
|
+
<span class="cline-any cline-neutral"> </span>
|
|
182
|
+
<span class="cline-any cline-neutral"> </span>
|
|
183
|
+
<span class="cline-any cline-neutral"> </span>
|
|
184
|
+
<span class="cline-any cline-neutral"> </span>
|
|
185
|
+
<span class="cline-any cline-neutral"> </span>
|
|
186
|
+
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import React, { useEffect, useState } from "react";
|
|
133
187
|
import MlFeatureEditor from "../MlFeatureEditor/MlFeatureEditor";
|
|
134
188
|
import * as turf from "@turf/turf";
|
|
135
189
|
|
|
@@ -137,29 +191,56 @@ interface MlMeasureToolProps {
|
|
|
137
191
|
/**
|
|
138
192
|
* String that specify if the Tool measures an area ("polygon") or length ("line")
|
|
139
193
|
*/
|
|
140
|
-
measureType
|
|
194
|
+
measureType?: string;
|
|
195
|
+
/**
|
|
196
|
+
* String that dictates which unit of measurement is used
|
|
197
|
+
*/
|
|
198
|
+
unit?: turf.Units;
|
|
141
199
|
}
|
|
142
200
|
|
|
143
|
-
const
|
|
144
|
-
|
|
201
|
+
//const unitSquareConvert = {
|
|
202
|
+
// kilometers: 1,
|
|
203
|
+
// miles: 1 / 2.58998811,
|
|
204
|
+
//};
|
|
205
|
+
function <span class="fstat-no" title="function not covered" >getUnitSquareMultiplier(</span>measureType:string | undefined) {
|
|
206
|
+
<span class="cstat-no" title="statement not covered" > return measureType === "miles" ? 1 / 2.58998811 : 1;</span>
|
|
207
|
+
}
|
|
208
|
+
function <span class="fstat-no" title="function not covered" >getUnitLabel(</span>measureType:string | undefined) {
|
|
209
|
+
<span class="cstat-no" title="statement not covered" > return measureType === "miles" ? 'mi' : 'km';</span>
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const MlMeasureTool = <span class="fstat-no" title="function not covered" >(p</span>rops: MlMeasureToolProps) => {
|
|
213
|
+
const [length, setLength] = <span class="cstat-no" title="statement not covered" >useState(0);</span>
|
|
214
|
+
const [currentFeatures, setCurrentFeatures] = <span class="cstat-no" title="statement not covered" >useState([undefined]);</span>
|
|
215
|
+
|
|
216
|
+
<span class="cstat-no" title="statement not covered" > useEffect(<span class="fstat-no" title="function not covered" >()</span> => {</span>
|
|
217
|
+
<span class="cstat-no" title="statement not covered" > if (currentFeatures[0]) {</span>
|
|
218
|
+
<span class="cstat-no" title="statement not covered" > setLength(</span>
|
|
219
|
+
props.measureType === "polygon"
|
|
220
|
+
? (turf.area(currentFeatures[0]) / 1000000) * getUnitSquareMultiplier(props.unit)
|
|
221
|
+
: turf.length(currentFeatures[0], { units: props.unit })
|
|
222
|
+
);
|
|
223
|
+
}
|
|
224
|
+
}, [props.unit, currentFeatures]);
|
|
145
225
|
|
|
146
226
|
<span class="cstat-no" title="statement not covered" > return (</span>
|
|
147
227
|
<>
|
|
148
228
|
<MlFeatureEditor
|
|
149
|
-
onChange={<span class="fstat-no" title="function not covered" >(f</span>eatures) => {
|
|
150
|
-
<span class="cstat-no" title="statement not covered" >
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}}}
|
|
154
|
-
mode = {props.measureType === "polygon" ? "custom_polygon" : "draw_line_string"}
|
|
229
|
+
onChange={<span class="fstat-no" title="function not covered" >(f</span>eatures:any) => {
|
|
230
|
+
<span class="cstat-no" title="statement not covered" > setCurrentFeatures(features);</span>
|
|
231
|
+
}}
|
|
232
|
+
mode={props.measureType === "polygon" ? "custom_polygon" : "draw_line_string"}
|
|
155
233
|
/>
|
|
156
|
-
{
|
|
157
|
-
|
|
234
|
+
{length.toFixed(2)} {getUnitLabel(props.unit)}
|
|
235
|
+
{props.measureType === "polygon" ? "²" : ""}
|
|
236
|
+
</>
|
|
237
|
+
);
|
|
158
238
|
};
|
|
159
239
|
|
|
160
|
-
|
|
240
|
+
MlMeasureTool.defaultProps = {
|
|
161
241
|
mapId: undefined,
|
|
162
242
|
measureType: "line",
|
|
243
|
+
unit: "kilometers",
|
|
163
244
|
};
|
|
164
245
|
export default MlMeasureTool;
|
|
165
246
|
</pre></td></tr></table></pre>
|
|
@@ -169,7 +250,7 @@ export default MlMeasureTool;
|
|
|
169
250
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
170
251
|
Code coverage generated by
|
|
171
252
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
172
|
-
at
|
|
253
|
+
at Tue Jul 12 2022 21:19:26 GMT+0000 (Coordinated Universal Time)
|
|
173
254
|
</div>
|
|
174
255
|
<script src="../../../prettify.js"></script>
|
|
175
256
|
<script>
|