@mapcomponents/react-maplibre 0.1.33 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +3 -0
- package/.github/workflows/storybook.yml +1 -1
- package/.storybook/.babelrc +26 -0
- package/.storybook/main.js +15 -1
- package/.storybook/mapcomponents_logo.png +0 -0
- package/CHANGELOG.md +10 -0
- package/config/env.js +106 -0
- package/config/getHttpsConfig.js +66 -0
- package/config/jest/babelTransform.js +29 -0
- package/config/jest/cssTransform.js +14 -0
- package/config/jest/fileTransform.js +40 -0
- package/config/modules.js +134 -0
- package/config/paths.js +75 -0
- package/config/pnpTs.js +35 -0
- package/config/webpack.config.js +757 -0
- package/config/webpackDevServer.config.js +130 -0
- package/coverage/clover.xml +822 -900
- package/coverage/coverage-final.json +23 -24
- package/coverage/lcov-report/index.html +135 -150
- package/coverage/lcov-report/src/components/MapLibreMap/{MapLibreMap.js.html → MapLibreMap.tsx.html} +77 -68
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +6 -6
- package/coverage/lcov-report/src/components/MlCreatePdfButton/{MlCreatePdfButton.js.html → MlCreatePdfButton.tsx.html} +40 -43
- package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +10 -10
- package/coverage/lcov-report/src/components/MlFeatureEditor/{MlFeatureEditor.js.html → MlFeatureEditor.tsx.html} +145 -85
- package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +21 -21
- package/coverage/lcov-report/src/components/{MlImageMarkerLayer/MlImageMarkerLayer.js.html → MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html} +141 -111
- package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +20 -20
- package/coverage/lcov-report/src/components/MlFollowGps/{MlFollowGps.js.html → MlFollowGps.tsx.html} +177 -138
- package/coverage/lcov-report/src/components/MlFollowGps/index.html +15 -15
- package/coverage/lcov-report/src/components/MlGPXViewer/{MlGPXViewer.js.html → MlGPXViewer.tsx.html} +134 -80
- package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
- package/coverage/lcov-report/src/components/MlGPXViewer/index.html +16 -16
- package/coverage/lcov-report/src/components/{MlLayer/MlLayer.js.html → MlGeoJsonLayer/MlGeoJsonLayer.tsx.html} +151 -154
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +19 -19
- package/coverage/lcov-report/src/components/{MlFillExtrusionLayer/MlFillExtrusionLayer.js.html → MlImageMarkerLayer/MlImageMarkerLayer.tsx.html} +151 -223
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +16 -16
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +229 -0
- package/coverage/lcov-report/src/components/MlLayer/index.html +21 -21
- package/coverage/lcov-report/src/components/MlLayerMagnify/{MlLayerMagnify.js.html → MlLayerMagnify.tsx.html} +134 -77
- package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +20 -20
- package/coverage/lcov-report/src/components/MlLayerSwipe/{MlLayerSwipe.js.html → MlLayerSwipe.tsx.html} +83 -41
- package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +2 -2
- package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +3 -15
- 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.js.html → MlMarker.tsx.html} +89 -137
- package/coverage/lcov-report/src/components/MlMarker/index.html +10 -10
- package/coverage/lcov-report/src/components/MlNavigationCompass/{MlNavigationCompass.js.html → MlNavigationCompass.tsx.html} +76 -25
- package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +17 -17
- package/coverage/lcov-report/src/components/MlNavigationTools/{MlNavigationTools.js.html → MlNavigationTools.tsx.html} +67 -52
- package/coverage/lcov-report/src/components/MlNavigationTools/index.html +10 -10
- package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.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 +3 -3
- package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
- package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +5 -5
- package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/{MlTransitionGeoJsonLayer.js.html → MlTransitionGeoJsonLayer.tsx.html} +127 -118
- package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +11 -11
- 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.js.html → MlVectorTileLayer.tsx.html} +59 -11
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +2 -2
- 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.js.html → MlWmsLayer.tsx.html} +56 -11
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +2 -2
- package/coverage/lcov-report/src/components/MlWmsLoader/{MlWmsLoader.js.html → MlWmsLoader.tsx.html} +102 -78
- package/coverage/lcov-report/src/components/MlWmsLoader/index.html +8 -8
- package/coverage/lcov-report/src/hooks/index.html +44 -29
- package/coverage/lcov-report/src/{components/MlGeoJsonLayer/MlGeoJsonLayer.js.html → hooks/useLayer.ts.html} +328 -184
- package/coverage/lcov-report/src/hooks/{useMap.js.html → useMap.ts.html} +140 -50
- package/coverage/lcov-report/src/hooks/{useMapState.js.html → useMapState.ts.html} +166 -61
- package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
- package/coverage/lcov-report/src/index.html +15 -15
- package/coverage/lcov-report/src/{i18n.js.html → index.ts.html} +50 -32
- package/coverage/lcov.info +1540 -1669
- package/dist/index.esm.css +195 -0
- package/dist/index.esm.js +17059 -4275
- package/dist/index.esm.js.map +1 -1
- package/docs-build/0.d0c23b79.iframe.bundle.js +2 -0
- package/docs-build/0.d0c23b79.iframe.bundle.js.map +1 -0
- package/docs-build/0.fd1aa3ea21956d993519.manager.bundle.js +1 -0
- package/docs-build/1.34075652.iframe.bundle.js +10 -0
- package/docs-build/1.34075652.iframe.bundle.js.map +1 -0
- package/docs-build/16.ca488dae.iframe.bundle.js +2 -0
- package/docs-build/16.ca488dae.iframe.bundle.js.map +1 -0
- package/docs-build/17.e40eac7f.iframe.bundle.js +17 -0
- package/docs-build/17.e40eac7f.iframe.bundle.js.map +1 -0
- package/docs-build/18.62af0912.iframe.bundle.js +14 -0
- package/docs-build/18.62af0912.iframe.bundle.js.map +1 -0
- package/docs-build/19.0a217189.iframe.bundle.js +2 -0
- package/docs-build/19.0a217189.iframe.bundle.js.map +1 -0
- package/docs-build/2.f15ae19a.iframe.bundle.js +2 -0
- package/docs-build/2.f15ae19a.iframe.bundle.js.map +1 -0
- package/docs-build/20.4c43e27c.iframe.bundle.js +4 -0
- package/docs-build/20.4c43e27c.iframe.bundle.js.map +1 -0
- package/docs-build/21.19c21085.iframe.bundle.js +22 -0
- package/docs-build/21.19c21085.iframe.bundle.js.map +1 -0
- package/docs-build/3.5dd9e88b.iframe.bundle.js +2 -0
- package/docs-build/3.5dd9e88b.iframe.bundle.js.map +1 -0
- package/docs-build/4.f741dafe1833630ec8bf.manager.bundle.js +2 -0
- package/docs-build/4.f741dafe1833630ec8bf.manager.bundle.js.LICENSE.txt +8 -0
- package/docs-build/5.d4de191e7daeefb036ca.manager.bundle.js +1 -0
- package/docs-build/6.2b178c5444648ee5c0fa.manager.bundle.js +2 -0
- package/docs-build/6.2b178c5444648ee5c0fa.manager.bundle.js.LICENSE.txt +12 -0
- package/docs-build/7.7c16aea8ec7ea6e91994.manager.bundle.js +1 -0
- package/docs-build/8.52fa838fdf937b29676a.manager.bundle.js +1 -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 +716 -0
- package/docs-build/{.gitkeep → catalogue/.gitkeep} +0 -0
- package/docs-build/catalogue/mc_meta.json +1 -0
- package/docs-build/favicon.ico +0 -0
- package/docs-build/iframe.html +348 -0
- package/docs-build/index.html +59 -0
- package/docs-build/logo.png +0 -0
- package/docs-build/main.8a7ec710ea1c16b5e13f.manager.bundle.js +1 -0
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js +2 -0
- package/docs-build/main~24120820.ba6665a8.iframe.bundle.js.map +1 -0
- package/docs-build/manifest.json +25 -0
- package/docs-build/robots.txt +3 -0
- package/docs-build/runtime~main.67aa1de2d72f40a81164.manager.bundle.js +1 -0
- 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/stories.json +331 -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/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.351900838c49e9200954.manager.bundle.js +2 -0
- package/docs-build/vendors~main.351900838c49e9200954.manager.bundle.js.LICENSE.txt +101 -0
- package/docs-build/vendors~main~0ad7406a.a6abfed7.iframe.bundle.js +8 -0
- package/docs-build/vendors~main~0ad7406a.a6abfed7.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~0f485567.1d7a15b7.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~0f485567.1d7a15b7.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~41a6ab2c.525ecc56.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~41a6ab2c.525ecc56.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js +8 -0
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~73914085.227c6747.iframe.bundle.js +293 -0
- package/docs-build/vendors~main~73914085.227c6747.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~9c5b28f6.f02cc741.iframe.bundle.js +7 -0
- package/docs-build/vendors~main~9c5b28f6.f02cc741.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b5906859.4083ac60.iframe.bundle.js +21 -0
- package/docs-build/vendors~main~b5906859.4083ac60.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b8f44717.7a612c34.iframe.bundle.js +89 -0
- package/docs-build/vendors~main~b8f44717.7a612c34.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js +68 -0
- package/docs-build/vendors~main~b9cf3951.45da142d.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~d939e436.92c27fbf.iframe.bundle.js +2 -0
- package/docs-build/vendors~main~d939e436.92c27fbf.iframe.bundle.js.map +1 -0
- package/docs-build/vendors~main~dab50aa4.b0d58038.iframe.bundle.js +107 -0
- package/docs-build/vendors~main~dab50aa4.b0d58038.iframe.bundle.js.map +1 -0
- package/package.json +134 -116
- package/public/favicon.ico +0 -0
- package/public/logo.png +0 -0
- package/rollup.config.js +26 -3
- package/scripts/start.js +166 -0
- package/scripts/test.js +53 -0
- package/src/components/MapLibreMap/MapLibreMap.stories.js +14 -5
- package/src/components/MapLibreMap/MapLibreMap.test.js +1 -1
- package/src/components/MapLibreMap/{MapLibreMap.js → MapLibreMap.tsx} +40 -37
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.test.js +3 -3
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +636 -0
- package/src/components/MlComponentTemplate/MlComponentTemplate.stories.js +0 -2
- package/src/components/MlComponentTemplate/MlComponentTemplate.tsx +42 -0
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.stories.js +0 -5
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx +51 -0
- package/src/components/MlCreatePdfButton/lib/{createPdf.js → createPdf.ts} +26 -23
- package/src/components/MlCreatePdfButton/lib/{nominatimMap.js → nominatimMap.ts} +3 -3
- package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +139 -0
- package/src/components/MlFeatureEditor/custom-direct-select-mode.js +12 -8
- package/src/components/MlFeatureEditor/custom-polygon-mode.js +9 -5
- package/src/components/MlFeatureEditor/custom-select-mode.js +11 -7
- package/src/components/MlFeatureEditor/lib/LICENSE.md +18 -0
- package/src/components/MlFeatureEditor/lib/common_selectors.js +4 -0
- package/src/components/MlFeatureEditor/lib/constants.js +4 -0
- package/src/components/MlFeatureEditor/lib/constrain_feature_movement.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_midpoint.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_supplementary_points.js +4 -0
- package/src/components/MlFeatureEditor/lib/create_vertex.js +4 -0
- package/src/components/MlFeatureEditor/lib/double_click_zoom.js +4 -0
- package/src/components/MlFeatureEditor/lib/euclidean_distance.js +4 -0
- package/src/components/MlFeatureEditor/lib/features_at.js +4 -0
- package/src/components/MlFeatureEditor/lib/get_features_and_set_cursor.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_click.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_event_at_coordinates.js +4 -0
- package/src/components/MlFeatureEditor/lib/is_tap.js +4 -0
- package/src/components/MlFeatureEditor/lib/map_event_to_bounding_box.js +4 -0
- package/src/components/MlFeatureEditor/lib/mode_handler.js +4 -0
- package/src/components/MlFeatureEditor/lib/mouse_event_point.js +4 -0
- package/src/components/MlFeatureEditor/lib/move_features.js +4 -0
- package/src/components/MlFeatureEditor/lib/sort_features.js +4 -0
- package/src/components/MlFeatureEditor/lib/string_set.js +4 -0
- package/src/components/MlFeatureEditor/lib/string_sets_are_equal.js +4 -0
- package/src/components/MlFeatureEditor/lib/theme.js +4 -0
- package/src/components/MlFeatureEditor/lib/to_dense_array.js +4 -0
- package/src/components/MlFeatureEditor/lib/utils.js +4 -0
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.js +6 -11
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx +85 -0
- package/src/components/MlFollowGps/MlFollowGps.stories.js +0 -2
- package/src/components/MlFollowGps/{MlFollowGps.js → MlFollowGps.tsx} +99 -86
- package/src/components/MlGPXViewer/{MlGPXViewer.js → MlGPXViewer.tsx} +68 -50
- package/src/components/MlGPXViewer/util/GeoJsonContext.ts +13 -0
- package/src/components/MlGPXViewer/util/{GeoJsonProvider.js → GeoJsonProvider.tsx} +3 -7
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.js +8 -3
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +106 -0
- package/src/components/MlGeoJsonLayer/util/{getDefaultLayerTypeByGeometry.js → getDefaultLayerTypeByGeometry.ts} +6 -1
- package/src/components/MlGeoJsonLayer/util/{getDefaultPaintPropsByType.js → getDefaultPaintPropsByType.ts} +1 -1
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.js +1 -4
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +129 -0
- package/src/components/MlLayer/MlLayer.stories.js +0 -2
- package/src/components/MlLayer/MlLayer.tsx +48 -0
- package/src/components/MlLayerMagnify/MlLayerMagnify.stories.js +3 -3
- package/src/components/MlLayerMagnify/{MlLayerMagnify.js → MlLayerMagnify.tsx} +62 -43
- package/src/components/MlLayerSwipe/MlLayerSwipe.stories.js +0 -2
- package/src/components/MlLayerSwipe/{MlLayerSwipe.js → MlLayerSwipe.tsx} +38 -24
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +0 -4
- package/src/components/MlMarker/MlMarker.tsx +140 -0
- package/src/components/MlNavigationCompass/{MlNavigationCompass.js → MlNavigationCompass.tsx} +27 -10
- package/src/components/MlNavigationTools/{MlNavigationTools.js → MlNavigationTools.tsx} +37 -32
- package/src/components/MlTransitionGeoJsonLayer/{MlTransitionGeoJsonLayer.js → MlTransitionGeoJsonLayer.tsx} +76 -73
- package/src/components/MlVectorTileLayer/{MlVectorTileLayer.js → MlVectorTileLayer.tsx} +23 -7
- package/src/components/MlWmsLayer/{MlWmsLayer.js → MlWmsLayer.tsx} +22 -7
- package/src/components/MlWmsLoader/{MlWmsLoader.js → MlWmsLoader.tsx} +55 -47
- package/src/custom.d.tsx +26 -0
- package/src/hooks/useLayer.ts +221 -0
- package/src/hooks/{useMap.js → useMap.ts} +48 -17
- package/src/hooks/{useMapState.js → useMapState.ts} +42 -7
- package/src/{index.js → index.ts} +15 -8
- package/tsconfig.json +18 -24
- package/.env +0 -1
- package/.storybook/main.bck.js +0 -56
- package/babel.config.json +0 -4
- package/coverage/lcov-report/src/translations/english.js.html +0 -94
- package/coverage/lcov-report/src/translations/german.js.html +0 -94
- package/coverage/lcov-report/src/translations/index.html +0 -131
- package/jest.config.json +0 -16
- package/jsdoc.json +0 -21
- package/public/assets/3D/posttower.gltf +0 -103
- package/public/assets/3D/posttower_simple.gltf +0 -103
- package/public/assets/3D/posttower_wh.gltf.glb +0 -0
- package/public/bee.png +0 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.js +0 -528
- package/src/components/MlComponentTemplate/MlComponentTemplate.js +0 -39
- package/src/components/MlCreatePdfButton/MlCreatePdfButton.js +0 -52
- package/src/components/MlFeatureEditor/MlFeatureEditor.js +0 -119
- package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.js +0 -153
- package/src/components/MlGPXViewer/util/GeoJsonContext.js +0 -6
- package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.js +0 -173
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.js +0 -75
- package/src/components/MlLayer/MlLayer.js +0 -107
- package/src/components/MlLayerMagnify/utils/compareMagnify.js +0 -173
- package/src/components/MlLayerSwipe/utils/swipeCompare.js +0 -220
- package/src/components/MlMarker/MlMarker.js +0 -156
- package/src/components/index.js +0 -6
- package/src/i18n.js +0 -28
- package/src/react-app-env.d.ts +0 -1
- package/src/stories/IntroductionCore.stories.mdx +0 -3
- package/src/stories/assets/code-brackets.svg +0 -1
- package/src/stories/assets/colors.svg +0 -1
- package/src/stories/assets/comments.svg +0 -1
- package/src/stories/assets/direction.svg +0 -1
- package/src/stories/assets/flow.svg +0 -1
- package/src/stories/assets/plugin.svg +0 -1
- package/src/stories/assets/repo.svg +0 -1
- package/src/stories/assets/stackalt.svg +0 -1
- package/src/stories/components/ComponentTeaser.js +0 -64
- package/src/translations/english.js +0 -4
- package/src/translations/german.js +0 -4
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for src/hooks/useMapState.
|
|
6
|
+
<title>Code coverage report for src/hooks/useMapState.ts</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
8
|
<link rel="stylesheet" href="../../prettify.css" />
|
|
9
9
|
<link rel="stylesheet" href="../../base.css" />
|
|
@@ -19,34 +19,34 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/hooks</a> useMapState.
|
|
22
|
+
<h1><a href="../../index.html">All files</a> / <a href="index.html">src/hooks</a> useMapState.ts</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
|
-
<span class="strong">
|
|
26
|
+
<span class="strong">56% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>
|
|
28
|
+
<span class='fraction'>28/50</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">30.76% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
|
-
<span class='fraction'>
|
|
35
|
+
<span class='fraction'>8/26</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">57.14% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
|
-
<span class='fraction'>
|
|
42
|
+
<span class='fraction'>4/7</span>
|
|
43
43
|
</div>
|
|
44
44
|
|
|
45
45
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
|
-
<span class="strong">
|
|
47
|
+
<span class="strong">56.25% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>
|
|
49
|
+
<span class='fraction'>27/48</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -217,7 +217,42 @@
|
|
|
217
217
|
<a name='L152'></a><a href='#L152'>152</a>
|
|
218
218
|
<a name='L153'></a><a href='#L153'>153</a>
|
|
219
219
|
<a name='L154'></a><a href='#L154'>154</a>
|
|
220
|
-
<a name='L155'></a><a href='#L155'>155</a
|
|
220
|
+
<a name='L155'></a><a href='#L155'>155</a>
|
|
221
|
+
<a name='L156'></a><a href='#L156'>156</a>
|
|
222
|
+
<a name='L157'></a><a href='#L157'>157</a>
|
|
223
|
+
<a name='L158'></a><a href='#L158'>158</a>
|
|
224
|
+
<a name='L159'></a><a href='#L159'>159</a>
|
|
225
|
+
<a name='L160'></a><a href='#L160'>160</a>
|
|
226
|
+
<a name='L161'></a><a href='#L161'>161</a>
|
|
227
|
+
<a name='L162'></a><a href='#L162'>162</a>
|
|
228
|
+
<a name='L163'></a><a href='#L163'>163</a>
|
|
229
|
+
<a name='L164'></a><a href='#L164'>164</a>
|
|
230
|
+
<a name='L165'></a><a href='#L165'>165</a>
|
|
231
|
+
<a name='L166'></a><a href='#L166'>166</a>
|
|
232
|
+
<a name='L167'></a><a href='#L167'>167</a>
|
|
233
|
+
<a name='L168'></a><a href='#L168'>168</a>
|
|
234
|
+
<a name='L169'></a><a href='#L169'>169</a>
|
|
235
|
+
<a name='L170'></a><a href='#L170'>170</a>
|
|
236
|
+
<a name='L171'></a><a href='#L171'>171</a>
|
|
237
|
+
<a name='L172'></a><a href='#L172'>172</a>
|
|
238
|
+
<a name='L173'></a><a href='#L173'>173</a>
|
|
239
|
+
<a name='L174'></a><a href='#L174'>174</a>
|
|
240
|
+
<a name='L175'></a><a href='#L175'>175</a>
|
|
241
|
+
<a name='L176'></a><a href='#L176'>176</a>
|
|
242
|
+
<a name='L177'></a><a href='#L177'>177</a>
|
|
243
|
+
<a name='L178'></a><a href='#L178'>178</a>
|
|
244
|
+
<a name='L179'></a><a href='#L179'>179</a>
|
|
245
|
+
<a name='L180'></a><a href='#L180'>180</a>
|
|
246
|
+
<a name='L181'></a><a href='#L181'>181</a>
|
|
247
|
+
<a name='L182'></a><a href='#L182'>182</a>
|
|
248
|
+
<a name='L183'></a><a href='#L183'>183</a>
|
|
249
|
+
<a name='L184'></a><a href='#L184'>184</a>
|
|
250
|
+
<a name='L185'></a><a href='#L185'>185</a>
|
|
251
|
+
<a name='L186'></a><a href='#L186'>186</a>
|
|
252
|
+
<a name='L187'></a><a href='#L187'>187</a>
|
|
253
|
+
<a name='L188'></a><a href='#L188'>188</a>
|
|
254
|
+
<a name='L189'></a><a href='#L189'>189</a>
|
|
255
|
+
<a name='L190'></a><a href='#L190'>190</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
221
256
|
<span class="cline-any cline-neutral"> </span>
|
|
222
257
|
<span class="cline-any cline-neutral"> </span>
|
|
223
258
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -229,18 +264,10 @@
|
|
|
229
264
|
<span class="cline-any cline-neutral"> </span>
|
|
230
265
|
<span class="cline-any cline-neutral"> </span>
|
|
231
266
|
<span class="cline-any cline-neutral"> </span>
|
|
232
|
-
<span class="cline-any cline-yes">135x</span>
|
|
233
267
|
<span class="cline-any cline-neutral"> </span>
|
|
234
|
-
<span class="cline-any cline-yes">135x</span>
|
|
235
|
-
<span class="cline-any cline-yes">135x</span>
|
|
236
268
|
<span class="cline-any cline-neutral"> </span>
|
|
237
|
-
<span class="cline-any cline-yes">135x</span>
|
|
238
|
-
<span class="cline-any cline-yes">135x</span>
|
|
239
269
|
<span class="cline-any cline-neutral"> </span>
|
|
240
|
-
<span class="cline-any cline-yes">135x</span>
|
|
241
|
-
<span class="cline-any cline-yes">135x</span>
|
|
242
270
|
<span class="cline-any cline-neutral"> </span>
|
|
243
|
-
<span class="cline-any cline-yes">135x</span>
|
|
244
271
|
<span class="cline-any cline-neutral"> </span>
|
|
245
272
|
<span class="cline-any cline-neutral"> </span>
|
|
246
273
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -248,7 +275,43 @@
|
|
|
248
275
|
<span class="cline-any cline-neutral"> </span>
|
|
249
276
|
<span class="cline-any cline-neutral"> </span>
|
|
250
277
|
<span class="cline-any cline-neutral"> </span>
|
|
251
|
-
<span class="cline-any cline-
|
|
278
|
+
<span class="cline-any cline-neutral"> </span>
|
|
279
|
+
<span class="cline-any cline-neutral"> </span>
|
|
280
|
+
<span class="cline-any cline-neutral"> </span>
|
|
281
|
+
<span class="cline-any cline-neutral"> </span>
|
|
282
|
+
<span class="cline-any cline-neutral"> </span>
|
|
283
|
+
<span class="cline-any cline-neutral"> </span>
|
|
284
|
+
<span class="cline-any cline-neutral"> </span>
|
|
285
|
+
<span class="cline-any cline-neutral"> </span>
|
|
286
|
+
<span class="cline-any cline-neutral"> </span>
|
|
287
|
+
<span class="cline-any cline-neutral"> </span>
|
|
288
|
+
<span class="cline-any cline-neutral"> </span>
|
|
289
|
+
<span class="cline-any cline-neutral"> </span>
|
|
290
|
+
<span class="cline-any cline-neutral"> </span>
|
|
291
|
+
<span class="cline-any cline-neutral"> </span>
|
|
292
|
+
<span class="cline-any cline-neutral"> </span>
|
|
293
|
+
<span class="cline-any cline-neutral"> </span>
|
|
294
|
+
<span class="cline-any cline-neutral"> </span>
|
|
295
|
+
<span class="cline-any cline-yes">169x</span>
|
|
296
|
+
<span class="cline-any cline-neutral"> </span>
|
|
297
|
+
<span class="cline-any cline-yes">169x</span>
|
|
298
|
+
<span class="cline-any cline-yes">169x</span>
|
|
299
|
+
<span class="cline-any cline-neutral"> </span>
|
|
300
|
+
<span class="cline-any cline-yes">169x</span>
|
|
301
|
+
<span class="cline-any cline-yes">169x</span>
|
|
302
|
+
<span class="cline-any cline-neutral"> </span>
|
|
303
|
+
<span class="cline-any cline-yes">169x</span>
|
|
304
|
+
<span class="cline-any cline-yes">169x</span>
|
|
305
|
+
<span class="cline-any cline-neutral"> </span>
|
|
306
|
+
<span class="cline-any cline-yes">169x</span>
|
|
307
|
+
<span class="cline-any cline-neutral"> </span>
|
|
308
|
+
<span class="cline-any cline-neutral"> </span>
|
|
309
|
+
<span class="cline-any cline-neutral"> </span>
|
|
310
|
+
<span class="cline-any cline-neutral"> </span>
|
|
311
|
+
<span class="cline-any cline-neutral"> </span>
|
|
312
|
+
<span class="cline-any cline-neutral"> </span>
|
|
313
|
+
<span class="cline-any cline-neutral"> </span>
|
|
314
|
+
<span class="cline-any cline-yes">169x</span>
|
|
252
315
|
<span class="cline-any cline-neutral"> </span>
|
|
253
316
|
<span class="cline-any cline-no"> </span>
|
|
254
317
|
<span class="cline-any cline-no"> </span>
|
|
@@ -267,36 +330,43 @@
|
|
|
267
330
|
<span class="cline-any cline-neutral"> </span>
|
|
268
331
|
<span class="cline-any cline-neutral"> </span>
|
|
269
332
|
<span class="cline-any cline-neutral"> </span>
|
|
270
|
-
<span class="cline-any cline-yes">
|
|
271
|
-
<span class="cline-any cline-
|
|
272
|
-
<span class="cline-any cline-
|
|
273
|
-
<span class="cline-any cline-
|
|
274
|
-
<span class="cline-any cline-
|
|
275
|
-
<span class="cline-any cline-
|
|
333
|
+
<span class="cline-any cline-yes">169x</span>
|
|
334
|
+
<span class="cline-any cline-no"> </span>
|
|
335
|
+
<span class="cline-any cline-neutral"> </span>
|
|
336
|
+
<span class="cline-any cline-no"> </span>
|
|
337
|
+
<span class="cline-any cline-no"> </span>
|
|
338
|
+
<span class="cline-any cline-no"> </span>
|
|
339
|
+
<span class="cline-any cline-no"> </span>
|
|
340
|
+
<span class="cline-any cline-no"> </span>
|
|
341
|
+
<span class="cline-any cline-neutral"> </span>
|
|
342
|
+
<span class="cline-any cline-neutral"> </span>
|
|
276
343
|
<span class="cline-any cline-neutral"> </span>
|
|
344
|
+
<span class="cline-any cline-yes">169x</span>
|
|
345
|
+
<span class="cline-any cline-yes">48x</span>
|
|
277
346
|
<span class="cline-any cline-neutral"> </span>
|
|
347
|
+
<span class="cline-any cline-yes">48x</span>
|
|
278
348
|
<span class="cline-any cline-neutral"> </span>
|
|
279
|
-
<span class="cline-any cline-yes">
|
|
280
|
-
<span class="cline-any cline-yes">
|
|
349
|
+
<span class="cline-any cline-yes">23x</span>
|
|
350
|
+
<span class="cline-any cline-yes">23x</span>
|
|
351
|
+
<span class="cline-any cline-yes">23x</span>
|
|
281
352
|
<span class="cline-any cline-neutral"> </span>
|
|
282
|
-
<span class="cline-any cline-yes">
|
|
353
|
+
<span class="cline-any cline-yes">23x</span>
|
|
283
354
|
<span class="cline-any cline-neutral"> </span>
|
|
284
|
-
<span class="cline-any cline-yes">20x</span>
|
|
285
|
-
<span class="cline-any cline-yes">20x</span>
|
|
286
|
-
<span class="cline-any cline-yes">20x</span>
|
|
287
355
|
<span class="cline-any cline-neutral"> </span>
|
|
288
|
-
<span class="cline-any cline-yes">20x</span>
|
|
289
356
|
<span class="cline-any cline-neutral"> </span>
|
|
357
|
+
<span class="cline-any cline-yes">169x</span>
|
|
358
|
+
<span class="cline-any cline-yes">169x</span>
|
|
290
359
|
<span class="cline-any cline-neutral"> </span>
|
|
291
360
|
<span class="cline-any cline-neutral"> </span>
|
|
292
|
-
<span class="cline-any cline-yes">
|
|
293
|
-
<span class="cline-any cline-yes">
|
|
361
|
+
<span class="cline-any cline-yes">48x</span>
|
|
362
|
+
<span class="cline-any cline-yes">48x</span>
|
|
294
363
|
<span class="cline-any cline-neutral"> </span>
|
|
364
|
+
<span class="cline-any cline-yes">48x</span>
|
|
365
|
+
<span class="cline-any cline-no"> </span>
|
|
366
|
+
<span class="cline-any cline-no"> </span>
|
|
295
367
|
<span class="cline-any cline-neutral"> </span>
|
|
296
|
-
<span class="cline-any cline-yes">42x</span>
|
|
297
|
-
<span class="cline-any cline-yes">42x</span>
|
|
298
368
|
<span class="cline-any cline-neutral"> </span>
|
|
299
|
-
<span class="cline-any cline-yes">
|
|
369
|
+
<span class="cline-any cline-yes">48x</span>
|
|
300
370
|
<span class="cline-any cline-no"> </span>
|
|
301
371
|
<span class="cline-any cline-neutral"> </span>
|
|
302
372
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -312,10 +382,10 @@
|
|
|
312
382
|
<span class="cline-any cline-neutral"> </span>
|
|
313
383
|
<span class="cline-any cline-neutral"> </span>
|
|
314
384
|
<span class="cline-any cline-neutral"> </span>
|
|
315
|
-
<span class="cline-any cline-yes">
|
|
316
|
-
<span class="cline-any cline-
|
|
385
|
+
<span class="cline-any cline-yes">48x</span>
|
|
386
|
+
<span class="cline-any cline-no"> </span>
|
|
317
387
|
<span class="cline-any cline-neutral"> </span>
|
|
318
|
-
<span class="cline-any cline-
|
|
388
|
+
<span class="cline-any cline-no"> </span>
|
|
319
389
|
<span class="cline-any cline-neutral"> </span>
|
|
320
390
|
<span class="cline-any cline-neutral"> </span>
|
|
321
391
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -327,13 +397,13 @@
|
|
|
327
397
|
<span class="cline-any cline-neutral"> </span>
|
|
328
398
|
<span class="cline-any cline-neutral"> </span>
|
|
329
399
|
<span class="cline-any cline-neutral"> </span>
|
|
330
|
-
<span class="cline-any cline-yes">
|
|
400
|
+
<span class="cline-any cline-yes">169x</span>
|
|
331
401
|
<span class="cline-any cline-neutral"> </span>
|
|
332
402
|
<span class="cline-any cline-neutral"> </span>
|
|
333
403
|
<span class="cline-any cline-neutral"> </span>
|
|
334
404
|
<span class="cline-any cline-neutral"> </span>
|
|
335
405
|
<span class="cline-any cline-neutral"> </span>
|
|
336
|
-
<span class="cline-any cline-yes">
|
|
406
|
+
<span class="cline-any cline-yes">12x</span>
|
|
337
407
|
<span class="cline-any cline-neutral"> </span>
|
|
338
408
|
<span class="cline-any cline-neutral"> </span>
|
|
339
409
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -345,7 +415,7 @@
|
|
|
345
415
|
<span class="cline-any cline-neutral"> </span>
|
|
346
416
|
<span class="cline-any cline-neutral"> </span>
|
|
347
417
|
<span class="cline-any cline-neutral"> </span>
|
|
348
|
-
<span class="cline-any cline-yes">
|
|
418
|
+
<span class="cline-any cline-yes">12x</span>
|
|
349
419
|
<span class="cline-any cline-neutral"> </span>
|
|
350
420
|
<span class="cline-any cline-neutral"> </span>
|
|
351
421
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -374,25 +444,53 @@
|
|
|
374
444
|
<span class="cline-any cline-neutral"> </span></td><td class="text"><pre class="prettyprint lang-js">import { useContext, useCallback, useState, useEffect, useRef } from "react";
|
|
375
445
|
import PropTypes from "prop-types";
|
|
376
446
|
import { v4 as uuidv4 } from "uuid";
|
|
447
|
+
// @ts-ignore
|
|
377
448
|
import { MapContext } from "@mapcomponents/react-core";
|
|
449
|
+
import MapLibreGlWrapper, {
|
|
450
|
+
LayerState,
|
|
451
|
+
ViewportState,
|
|
452
|
+
} from "../components/MapLibreMap/lib/MapLibreGlWrapper";
|
|
378
453
|
|
|
454
|
+
type useMapStateType = {
|
|
455
|
+
layers: (LayerState | undefined)[];
|
|
456
|
+
viewport: ViewportState | undefined;
|
|
457
|
+
};
|
|
458
|
+
type MapContext = {
|
|
459
|
+
mapIds: [string?];
|
|
460
|
+
mapExists: Function;
|
|
461
|
+
maps: [];
|
|
462
|
+
getMap: Function;
|
|
463
|
+
setMap: Function;
|
|
464
|
+
};
|
|
379
465
|
/**
|
|
380
466
|
* React hook that allows subscribing to map state changes
|
|
381
467
|
*
|
|
382
468
|
* @component
|
|
383
469
|
*/
|
|
384
|
-
function useMapState(props
|
|
470
|
+
function useMapState(props: {
|
|
471
|
+
mapId?: string;
|
|
472
|
+
watch?: {
|
|
473
|
+
layers?: boolean;
|
|
474
|
+
sources?: boolean;
|
|
475
|
+
viewport?: boolean;
|
|
476
|
+
};
|
|
477
|
+
filter?: {
|
|
478
|
+
includeBaseLayers?: boolean;
|
|
479
|
+
matchLayerIds?: RegExp | string;
|
|
480
|
+
matchSourceIds?: RegExp | string;
|
|
481
|
+
};
|
|
482
|
+
}): useMapStateType {
|
|
385
483
|
// Use a useRef hook to reference the layer object to be able to access it later inside useEffect hooks
|
|
386
|
-
const mapContext = useContext(MapContext);
|
|
484
|
+
const mapContext: MapContext = useContext(MapContext);
|
|
387
485
|
|
|
388
486
|
const initializedRef = useRef(false);
|
|
389
|
-
const mapRef = useRef(
|
|
487
|
+
const mapRef = useRef<MapLibreGlWrapper>();
|
|
390
488
|
|
|
391
|
-
const [viewport, setViewport] = useState(
|
|
489
|
+
const [viewport, setViewport] = useState<ViewportState | undefined>();
|
|
392
490
|
const viewportRef = useRef(undefined);
|
|
393
491
|
|
|
394
|
-
const [layers, setLayers] = useState(undefined);
|
|
395
|
-
const layersRef = useRef(
|
|
492
|
+
const [layers, setLayers] = useState<(LayerState | undefined)[]>([]);
|
|
493
|
+
const layersRef = useRef<string>();
|
|
396
494
|
//const mapRef = useRef(props.map);
|
|
397
495
|
const componentId = useRef(uuidv4());
|
|
398
496
|
|
|
@@ -421,12 +519,14 @@ function useMapState(props) {
|
|
|
421
519
|
[props.filter]
|
|
422
520
|
);
|
|
423
521
|
|
|
424
|
-
const refreshLayerState = useCallback(() => {
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
522
|
+
const refreshLayerState = useCallback(<span class="fstat-no" title="function not covered" >()</span> => {
|
|
523
|
+
<span class="cstat-no" title="statement not covered" > if (!mapRef.current) <span class="cstat-no" title="statement not covered" >return;</span></span>
|
|
524
|
+
|
|
525
|
+
let _layerState = <span class="cstat-no" title="statement not covered" >mapRef.current.wrapper.layerState.filter(layerIdFilter);</span>
|
|
526
|
+
let _layerStateString = <span class="cstat-no" title="statement not covered" >JSON.stringify(_layerState);</span>
|
|
527
|
+
<span class="cstat-no" title="statement not covered" > if (layersRef.current !== _layerStateString) {</span>
|
|
528
|
+
<span class="cstat-no" title="statement not covered" > layersRef.current = _layerStateString;</span>
|
|
529
|
+
<span class="cstat-no" title="statement not covered" > setLayers(_layerState);</span>
|
|
430
530
|
}
|
|
431
531
|
}, [layerIdFilter]);
|
|
432
532
|
|
|
@@ -435,7 +535,7 @@ function useMapState(props) {
|
|
|
435
535
|
|
|
436
536
|
return () => {
|
|
437
537
|
// cleanup all event listeners
|
|
438
|
-
if (mapRef.current) {
|
|
538
|
+
<span class="missing-if-branch" title="else path not taken" >E</span>if (mapRef.current) {
|
|
439
539
|
mapRef.current.cleanup(_componentId);
|
|
440
540
|
mapRef.current = undefined;
|
|
441
541
|
}
|
|
@@ -449,6 +549,11 @@ function useMapState(props) {
|
|
|
449
549
|
// initialize the layer and add it to the MapLibre-gl instance or do something else with it
|
|
450
550
|
initializedRef.current = true;
|
|
451
551
|
mapRef.current = mapContext.getMap(props.mapId);
|
|
552
|
+
|
|
553
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (!mapRef.current) {
|
|
554
|
+
<span class="cstat-no" title="statement not covered" > initializedRef.current = false;</span>
|
|
555
|
+
<span class="cstat-no" title="statement not covered" > return;</span>
|
|
556
|
+
}
|
|
452
557
|
|
|
453
558
|
<span class="missing-if-branch" title="if path not taken" >I</span>if (props?.watch?.viewport) {
|
|
454
559
|
<span class="cstat-no" title="statement not covered" > setViewport(mapRef.current.wrapper.viewportState);</span>
|
|
@@ -466,10 +571,10 @@ function useMapState(props) {
|
|
|
466
571
|
}
|
|
467
572
|
|
|
468
573
|
// register layerchange event handler
|
|
469
|
-
if (props?.watch?.layers) {
|
|
470
|
-
refreshLayerState()
|
|
574
|
+
<span class="missing-if-branch" title="if path not taken" >I</span>if (props?.watch?.layers) {
|
|
575
|
+
<span class="cstat-no" title="statement not covered" > refreshLayerState();</span>
|
|
471
576
|
|
|
472
|
-
mapRef.current.wrapper.on(
|
|
577
|
+
<span class="cstat-no" title="statement not covered" > mapRef.current.wrapper.on(</span>
|
|
473
578
|
"layerchange",
|
|
474
579
|
refreshLayerState,
|
|
475
580
|
{
|
|
@@ -532,7 +637,7 @@ export default useMapState;
|
|
|
532
637
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
533
638
|
Code coverage generated by
|
|
534
639
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
535
|
-
at
|
|
640
|
+
at Wed Apr 20 2022 08:13:18 GMT+0000 (Coordinated Universal Time)
|
|
536
641
|
</div>
|
|
537
642
|
<script src="../../prettify.js"></script>
|
|
538
643
|
<script>
|
|
@@ -343,7 +343,7 @@ export default useWms;
|
|
|
343
343
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
344
344
|
Code coverage generated by
|
|
345
345
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
346
|
-
at
|
|
346
|
+
at Wed Apr 20 2022 08:13:18 GMT+0000 (Coordinated Universal Time)
|
|
347
347
|
</div>
|
|
348
348
|
<script src="../../prettify.js"></script>
|
|
349
349
|
<script>
|
|
@@ -25,19 +25,19 @@
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/0</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
35
|
<span class='fraction'>0/0</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
42
|
<span class='fraction'>0/0</span>
|
|
43
43
|
</div>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/0</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -79,18 +79,18 @@
|
|
|
79
79
|
</tr>
|
|
80
80
|
</thead>
|
|
81
81
|
<tbody><tr>
|
|
82
|
-
<td class="file
|
|
83
|
-
<td data-value="0" class="pic
|
|
82
|
+
<td class="file empty" data-value="index.ts"><a href="index.ts.html">index.ts</a></td>
|
|
83
|
+
<td data-value="0" class="pic empty">
|
|
84
84
|
<div class="chart"><div class="cover-fill" style="width: 0%"></div><div class="cover-empty" style="width: 100%"></div></div>
|
|
85
85
|
</td>
|
|
86
|
-
<td data-value="0" class="pct
|
|
87
|
-
<td data-value="
|
|
88
|
-
<td data-value="
|
|
89
|
-
<td data-value="0" class="abs
|
|
90
|
-
<td data-value="
|
|
91
|
-
<td data-value="0" class="abs
|
|
92
|
-
<td data-value="0" class="pct
|
|
93
|
-
<td data-value="
|
|
86
|
+
<td data-value="0" class="pct empty">0%</td>
|
|
87
|
+
<td data-value="0" class="abs empty">0/0</td>
|
|
88
|
+
<td data-value="0" class="pct empty">0%</td>
|
|
89
|
+
<td data-value="0" class="abs empty">0/0</td>
|
|
90
|
+
<td data-value="0" class="pct empty">0%</td>
|
|
91
|
+
<td data-value="0" class="abs empty">0/0</td>
|
|
92
|
+
<td data-value="0" class="pct empty">0%</td>
|
|
93
|
+
<td data-value="0" class="abs empty">0/0</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 Wed Apr 20 2022 08:13:18 GMT+0000 (Coordinated Universal Time)
|
|
105
105
|
</div>
|
|
106
106
|
<script src="../prettify.js"></script>
|
|
107
107
|
<script>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<html lang="en">
|
|
4
4
|
|
|
5
5
|
<head>
|
|
6
|
-
<title>Code coverage report for src/
|
|
6
|
+
<title>Code coverage report for src/index.ts</title>
|
|
7
7
|
<meta charset="utf-8" />
|
|
8
8
|
<link rel="stylesheet" href="../prettify.css" />
|
|
9
9
|
<link rel="stylesheet" href="../base.css" />
|
|
@@ -19,25 +19,25 @@
|
|
|
19
19
|
<body>
|
|
20
20
|
<div class='wrapper'>
|
|
21
21
|
<div class='pad1'>
|
|
22
|
-
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a>
|
|
22
|
+
<h1><a href="../index.html">All files</a> / <a href="index.html">src</a> index.ts</h1>
|
|
23
23
|
<div class='clearfix'>
|
|
24
24
|
|
|
25
25
|
<div class='fl pad1y space-right2'>
|
|
26
26
|
<span class="strong">0% </span>
|
|
27
27
|
<span class="quiet">Statements</span>
|
|
28
|
-
<span class='fraction'>0/
|
|
28
|
+
<span class='fraction'>0/0</span>
|
|
29
29
|
</div>
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
<div class='fl pad1y space-right2'>
|
|
33
|
-
<span class="strong">
|
|
33
|
+
<span class="strong">0% </span>
|
|
34
34
|
<span class="quiet">Branches</span>
|
|
35
35
|
<span class='fraction'>0/0</span>
|
|
36
36
|
</div>
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
<div class='fl pad1y space-right2'>
|
|
40
|
-
<span class="strong">
|
|
40
|
+
<span class="strong">0% </span>
|
|
41
41
|
<span class="quiet">Functions</span>
|
|
42
42
|
<span class='fraction'>0/0</span>
|
|
43
43
|
</div>
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
<div class='fl pad1y space-right2'>
|
|
47
47
|
<span class="strong">0% </span>
|
|
48
48
|
<span class="quiet">Lines</span>
|
|
49
|
-
<span class='fraction'>0/
|
|
49
|
+
<span class='fraction'>0/0</span>
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
|
|
@@ -90,7 +90,13 @@
|
|
|
90
90
|
<a name='L25'></a><a href='#L25'>25</a>
|
|
91
91
|
<a name='L26'></a><a href='#L26'>26</a>
|
|
92
92
|
<a name='L27'></a><a href='#L27'>27</a>
|
|
93
|
-
<a name='L28'></a><a href='#L28'>28</a
|
|
93
|
+
<a name='L28'></a><a href='#L28'>28</a>
|
|
94
|
+
<a name='L29'></a><a href='#L29'>29</a>
|
|
95
|
+
<a name='L30'></a><a href='#L30'>30</a>
|
|
96
|
+
<a name='L31'></a><a href='#L31'>31</a>
|
|
97
|
+
<a name='L32'></a><a href='#L32'>32</a>
|
|
98
|
+
<a name='L33'></a><a href='#L33'>33</a>
|
|
99
|
+
<a name='L34'></a><a href='#L34'>34</a></td><td class="line-coverage quiet"><span class="cline-any cline-neutral"> </span>
|
|
94
100
|
<span class="cline-any cline-neutral"> </span>
|
|
95
101
|
<span class="cline-any cline-neutral"> </span>
|
|
96
102
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -99,10 +105,8 @@
|
|
|
99
105
|
<span class="cline-any cline-neutral"> </span>
|
|
100
106
|
<span class="cline-any cline-neutral"> </span>
|
|
101
107
|
<span class="cline-any cline-neutral"> </span>
|
|
102
|
-
<span class="cline-any cline-no"> </span>
|
|
103
108
|
<span class="cline-any cline-neutral"> </span>
|
|
104
109
|
<span class="cline-any cline-neutral"> </span>
|
|
105
|
-
<span class="cline-any cline-no"> </span>
|
|
106
110
|
<span class="cline-any cline-neutral"> </span>
|
|
107
111
|
<span class="cline-any cline-neutral"> </span>
|
|
108
112
|
<span class="cline-any cline-neutral"> </span>
|
|
@@ -117,41 +121,55 @@
|
|
|
117
121
|
<span class="cline-any cline-neutral"> </span>
|
|
118
122
|
<span class="cline-any cline-neutral"> </span>
|
|
119
123
|
<span class="cline-any cline-neutral"> </span>
|
|
120
|
-
<span class="cline-any cline-neutral"> </span
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
<span class="cline-any cline-neutral"> </span>
|
|
125
|
+
<span class="cline-any cline-neutral"> </span>
|
|
126
|
+
<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></td><td class="text"><pre class="prettyprint lang-js">export { default as MapLibreMap } from "./components/MapLibreMap/MapLibreMap";
|
|
133
|
+
export { default as MlComponentTemplate } from "./components/MlComponentTemplate/MlComponentTemplate";
|
|
134
|
+
export { default as MlCreatePdfButton } from "./components/MlCreatePdfButton/MlCreatePdfButton";
|
|
135
|
+
export { default as MlFeatureEditor } from "./components/MlFeatureEditor/MlFeatureEditor";
|
|
136
|
+
export { default as MlFillExtrusionLayer } from "./components/MlFillExtrusionLayer/MlFillExtrusionLayer";
|
|
137
|
+
export { default as MlFollowGps } from "./components/MlFollowGps/MlFollowGps";
|
|
138
|
+
export { default as MlGeoJsonLayer } from "./components/MlGeoJsonLayer/MlGeoJsonLayer";
|
|
139
|
+
export { default as MlImageMarkerLayer } from "./components/MlImageMarkerLayer/MlImageMarkerLayer";
|
|
140
|
+
export { default as MlNavigationTools } from "./components/MlNavigationTools/MlNavigationTools";
|
|
141
|
+
export { default as MlNavigationCompass } from "./components/MlNavigationCompass/MlNavigationCompass";
|
|
142
|
+
export { default as MlLayer } from "./components/MlLayer/MlLayer";
|
|
143
|
+
export { default as MlVectorTileLayer } from "./components/MlVectorTileLayer/MlVectorTileLayer";
|
|
144
|
+
export { default as MlWmsLayer } from "./components/MlWmsLayer/MlWmsLayer";
|
|
130
145
|
|
|
146
|
+
export { default as MlLayerMagnify } from "./components/MlLayerMagnify/MlLayerMagnify";
|
|
147
|
+
export { default as MlLayerSwipe } from "./components/MlLayerSwipe/MlLayerSwipe";
|
|
131
148
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
.init({
|
|
135
|
-
resources,
|
|
136
|
-
lng: "de", // language to use, more information here: https://www.i18next.com/overview/configuration-options#languages-namespaces-resources
|
|
137
|
-
// you can use the i18n.changeLanguage function to change the language manually: https://www.i18next.com/overview/api#changelanguage
|
|
138
|
-
// if you're using a language detector, do not define the lng option
|
|
149
|
+
export { default as MlTransitionGeoJsonLayer } from "./components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer";
|
|
150
|
+
export { default as MlMarker } from "./components/MlMarker/MlMarker";
|
|
139
151
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
});
|
|
152
|
+
export { default as MlGPXViewer } from "./components/MlGPXViewer/MlGPXViewer";
|
|
153
|
+
export { default as GeoJsonProvider } from "./components/MlGPXViewer/util/GeoJsonProvider";
|
|
154
|
+
export { default as GeoJsonContext } from "./components/MlGPXViewer/util/GeoJsonContext";
|
|
144
155
|
|
|
156
|
+
export { default as MlSpatialElevationProfile } from "./components/MlSpatialElevationProfile/MlSpatialElevationProfile.js";
|
|
145
157
|
|
|
158
|
+
export { default as MlOsmLayer } from "./components/MlOsmLayer/MlOsmLayer.js";
|
|
159
|
+
export { default as MlBasicComponent } from "./components/MlBasicComponent.js";
|
|
146
160
|
|
|
147
|
-
export default
|
|
161
|
+
export { default as useLayer } from "./hooks/useLayer";
|
|
162
|
+
export { default as useMapState } from "./hooks/useMapState";
|
|
163
|
+
export { default as useMap } from "./hooks/useMap";
|
|
164
|
+
export { default as useWms } from "./hooks/useWms.js";
|
|
165
|
+
//</pre></td></tr></table></pre>
|
|
148
166
|
|
|
149
167
|
<div class='push'></div><!-- for sticky footer -->
|
|
150
168
|
</div><!-- /wrapper -->
|
|
151
169
|
<div class='footer quiet pad2 space-top1 center small'>
|
|
152
170
|
Code coverage generated by
|
|
153
171
|
<a href="https://istanbul.js.org/" target="_blank" rel="noopener noreferrer">istanbul</a>
|
|
154
|
-
at
|
|
172
|
+
at Wed Apr 20 2022 08:13:18 GMT+0000 (Coordinated Universal Time)
|
|
155
173
|
</div>
|
|
156
174
|
<script src="../prettify.js"></script>
|
|
157
175
|
<script>
|