@mapcomponents/react-maplibre 0.1.45 → 0.1.49
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 +23 -0
- package/README.md +61 -150
- package/coverage/clover.xml +350 -269
- package/coverage/coverage-final.json +11 -9
- package/coverage/lcov-report/index.html +95 -80
- package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +61 -31
- package/coverage/lcov-report/src/components/MapLibreMap/index.html +17 -17
- 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 +1 -1
- package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +188 -53
- package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +21 -21
- package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
- package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
- package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +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 +2 -2
- 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 +265 -0
- package/coverage/lcov-report/src/components/MlMeasureTool/index.html +116 -0
- 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 +232 -0
- package/coverage/lcov-report/src/components/MlOsmLayer/index.html +25 -10
- 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 +1 -1
- 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 +74 -20
- package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +19 -19
- 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 +80 -20
- package/coverage/lcov-report/src/components/MlWmsLayer/index.html +21 -21
- 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 +19 -19
- package/coverage/lcov-report/src/hooks/useLayer.ts.html +95 -71
- 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 +12 -6
- package/coverage/lcov.info +688 -497
- 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 +75 -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 +69 -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 +68 -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 +24 -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 +193 -60
- 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/public/thumbnails/MlMeasureTool.png +0 -0
- package/src/components/MapLibreMap/MapLibreMap.stories.js +75 -20
- package/src/components/MapLibreMap/MapLibreMap.tsx +12 -2
- package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +2 -2
- 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/MlImageMarkerLayer/MlImageMarkerLayer.test.js +1 -1
- package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +82 -37
- package/src/components/MlLayerSwitcher/MlLayerSwitcher.js +1 -1
- package/src/components/MlMeasureTool/MlMeasureTool.doc.de.md +3 -0
- package/src/components/MlMeasureTool/MlMeasureTool.meta.json +15 -0
- package/src/components/MlMeasureTool/MlMeasureTool.stories.js +96 -0
- package/src/components/MlMeasureTool/MlMeasureTool.tsx +60 -0
- package/src/components/MlOsmLayer/{MlOsmLayer.stories.js → MlOsmLayer.stories_.js} +0 -0
- package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +26 -8
- package/src/components/MlWmsLayer/MlWmsLayer.stories.js +2 -3
- package/src/components/MlWmsLayer/MlWmsLayer.tsx +27 -7
- 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 +15 -7
- package/src/hooks/useWms.js +1 -1
- package/src/index.ts +5 -4
- package/src/util/layerRemovalTest.js +5 -0
- package/tsconfig.json +35 -7
- package/docs-build/0.20735a16c2ad9677fe7d.manager.bundle.js +0 -1
- package/docs-build/0.b1b9b035.iframe.bundle.js +0 -2
- package/docs-build/0.b1b9b035.iframe.bundle.js.map +0 -1
- package/docs-build/1.c50fb367.iframe.bundle.js +0 -10
- package/docs-build/1.c50fb367.iframe.bundle.js.map +0 -1
- package/docs-build/17.2e544968.iframe.bundle.js +0 -2
- package/docs-build/17.2e544968.iframe.bundle.js.map +0 -1
- package/docs-build/18.42087006.iframe.bundle.js +0 -17
- package/docs-build/18.42087006.iframe.bundle.js.map +0 -1
- package/docs-build/19.7e782442.iframe.bundle.js +0 -14
- package/docs-build/19.7e782442.iframe.bundle.js.map +0 -1
- package/docs-build/2.e58dc625.iframe.bundle.js +0 -2
- package/docs-build/2.e58dc625.iframe.bundle.js.map +0 -1
- package/docs-build/20.f009289a.iframe.bundle.js +0 -2
- package/docs-build/20.f009289a.iframe.bundle.js.map +0 -1
- package/docs-build/21.1cdc9040.iframe.bundle.js +0 -4
- package/docs-build/21.1cdc9040.iframe.bundle.js.map +0 -1
- package/docs-build/22.c9e6b2d7.iframe.bundle.js +0 -22
- package/docs-build/22.c9e6b2d7.iframe.bundle.js.map +0 -1
- package/docs-build/3.a8172b89.iframe.bundle.js +0 -2
- package/docs-build/3.a8172b89.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.edd86ba9.iframe.bundle.js +0 -2
- package/docs-build/main~24120820.edd86ba9.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/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.2054ae7c.iframe.bundle.js +0 -8
- package/docs-build/vendors~main~0ad7406a.2054ae7c.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~0f485567.de36692f.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~0f485567.de36692f.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~41a6ab2c.a947ed53.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~41a6ab2c.a947ed53.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js +0 -8
- package/docs-build/vendors~main~52589227.1d1558cd.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~57c1f6cb.6a433835.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~57c1f6cb.6a433835.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~73914085.a8e03e3b.iframe.bundle.js +0 -293
- package/docs-build/vendors~main~73914085.a8e03e3b.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~9c5b28f6.7b8beed1.iframe.bundle.js +0 -7
- package/docs-build/vendors~main~9c5b28f6.7b8beed1.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b5906859.7f66dcaf.iframe.bundle.js +0 -21
- package/docs-build/vendors~main~b5906859.7f66dcaf.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b8f44717.7053e467.iframe.bundle.js +0 -89
- package/docs-build/vendors~main~b8f44717.7053e467.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~b9cf3951.a4fd68f5.iframe.bundle.js +0 -63
- package/docs-build/vendors~main~b9cf3951.a4fd68f5.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~d939e436.ba1cad1b.iframe.bundle.js +0 -2
- package/docs-build/vendors~main~d939e436.ba1cad1b.iframe.bundle.js.map +0 -1
- package/docs-build/vendors~main~f420d588.59c93444.iframe.bundle.js +0 -107
- package/docs-build/vendors~main~f420d588.59c93444.iframe.bundle.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import { MapOptions as MapOptionsType } from "maplibre-gl";
|
|
3
|
+
import "maplibre-gl/dist/maplibre-gl.css";
|
|
4
|
+
declare type MapLibreMapProps = {
|
|
5
|
+
/**
|
|
6
|
+
* Id of the MapLibreGl(Wrapper) instance in mapContext
|
|
7
|
+
*/
|
|
8
|
+
mapId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Config object that is passed to the MapLibreGl constructor as first parameter.
|
|
11
|
+
* See https://maplibre.org/maplibre-gl-js-docs/api/map/ for a formal documentation of al
|
|
12
|
+
* available properties.
|
|
13
|
+
*/
|
|
14
|
+
options?: Partial<MapOptionsType>;
|
|
15
|
+
/**
|
|
16
|
+
* css style definition passed to the map container DOM element
|
|
17
|
+
*/
|
|
18
|
+
style?: object;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Creates a MapLibreGlWrapper instance and registers it in MapContext
|
|
22
|
+
* after the MapLibre-gl load event has fired.
|
|
23
|
+
*
|
|
24
|
+
* MapLibreMap returns the html node that will be used by MapLibre-gl to render the map.
|
|
25
|
+
* This Component must be kept unaware of any related components that interact with the MapLibre-gl
|
|
26
|
+
* instance.
|
|
27
|
+
*
|
|
28
|
+
* @category Map components
|
|
29
|
+
*/
|
|
30
|
+
declare const MapLibreMap: FC<MapLibreMapProps>;
|
|
31
|
+
export default MapLibreMap;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default storyoptions;
|
|
2
|
+
export const ExampleConfig: any;
|
|
3
|
+
export const StyleChangeConfig: any;
|
|
4
|
+
declare namespace storyoptions {
|
|
5
|
+
export const title: string;
|
|
6
|
+
export { MapLibreMap as component };
|
|
7
|
+
export namespace argTypes {
|
|
8
|
+
namespace options {
|
|
9
|
+
namespace control {
|
|
10
|
+
const type: string;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
import MapLibreMap from "./MapLibreMap";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { Map, IControl, MapOptions as MapOptionsType } from "!maplibre-gl";
|
|
2
|
+
declare type EventArgArray = [string, string | Function, Function?];
|
|
3
|
+
declare type LayerState = {
|
|
4
|
+
id: string;
|
|
5
|
+
type: string;
|
|
6
|
+
visible: boolean;
|
|
7
|
+
baseLayer: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare type ViewportState = {
|
|
10
|
+
center: {
|
|
11
|
+
lng: number;
|
|
12
|
+
lat: number;
|
|
13
|
+
};
|
|
14
|
+
zoom: number;
|
|
15
|
+
bearing: number;
|
|
16
|
+
pitch: number;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Creates a MapLibre-gl-js instance and offers all of the native MapLibre functions and properties as well as additional functionality such as element registration & cleanup and more events.
|
|
20
|
+
*
|
|
21
|
+
* @param {object} props
|
|
22
|
+
*
|
|
23
|
+
* @class
|
|
24
|
+
*/
|
|
25
|
+
declare class MapLibreGlWrapper {
|
|
26
|
+
registeredElements: {
|
|
27
|
+
[key: string]: {
|
|
28
|
+
layers: [string?];
|
|
29
|
+
sources: [string?];
|
|
30
|
+
images: [string?];
|
|
31
|
+
controls: [IControl?];
|
|
32
|
+
events: [EventArgArray?];
|
|
33
|
+
wrapperEvents: [EventArgArray?];
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
baseLayers: [string?];
|
|
37
|
+
firstSymbolLayer: string | undefined;
|
|
38
|
+
eventHandlers: {
|
|
39
|
+
layerchange: [Function?];
|
|
40
|
+
viewportchange: [Function?];
|
|
41
|
+
};
|
|
42
|
+
wrapper: {
|
|
43
|
+
on: Function;
|
|
44
|
+
off: Function;
|
|
45
|
+
fire: Function;
|
|
46
|
+
layerState: [LayerState?];
|
|
47
|
+
layerStateString: string;
|
|
48
|
+
oldLayerStateStrings: object;
|
|
49
|
+
buildLayerObject: Function;
|
|
50
|
+
buildLayerObjects: Function;
|
|
51
|
+
refreshLayerState: Function;
|
|
52
|
+
viewportState: ViewportState;
|
|
53
|
+
viewportStateString: string;
|
|
54
|
+
oldViewportStateString: string;
|
|
55
|
+
getViewport: Function;
|
|
56
|
+
refreshViewport: Function;
|
|
57
|
+
};
|
|
58
|
+
initRegisteredElements: Function;
|
|
59
|
+
addNativeMaplibreFunctionsAndProps: Function;
|
|
60
|
+
map: Map;
|
|
61
|
+
style: object;
|
|
62
|
+
styleJson: object;
|
|
63
|
+
addLayer: Function;
|
|
64
|
+
addSource: Function;
|
|
65
|
+
addControl: Function;
|
|
66
|
+
addImage: Function;
|
|
67
|
+
on: Function;
|
|
68
|
+
cleanup: Function;
|
|
69
|
+
constructor(props: {
|
|
70
|
+
mapOptions: MapOptionsType;
|
|
71
|
+
onReady: Function;
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
export default MapLibreGlWrapper;
|
|
75
|
+
export type { LayerState, ViewportState };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
interface MlComponentTemplateProps {
|
|
2
|
+
/**
|
|
3
|
+
* Id of the target MapLibre instance in mapContext
|
|
4
|
+
*/
|
|
5
|
+
mapId?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
8
|
+
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
9
|
+
*/
|
|
10
|
+
insertBeforeLayer?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Component template
|
|
14
|
+
*
|
|
15
|
+
*/
|
|
16
|
+
declare const MlComponentTemplate: {
|
|
17
|
+
(props: MlComponentTemplateProps): JSX.Element;
|
|
18
|
+
defaultProps: {
|
|
19
|
+
mapId: undefined;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default MlComponentTemplate;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default storyoptions;
|
|
2
|
+
export const ExampleConfig: any;
|
|
3
|
+
declare namespace storyoptions {
|
|
4
|
+
export const title: string;
|
|
5
|
+
export { MlComponentTemplate as component };
|
|
6
|
+
export const argTypes: {};
|
|
7
|
+
export { mapContextDecorator as decorators };
|
|
8
|
+
}
|
|
9
|
+
import MlComponentTemplate from "./MlComponentTemplate";
|
|
10
|
+
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface MlCreatePdfButtonProps {
|
|
2
|
+
/**
|
|
3
|
+
* Id of the target MapLibre instance in mapContext
|
|
4
|
+
*/
|
|
5
|
+
mapId?: string;
|
|
6
|
+
/**
|
|
7
|
+
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
8
|
+
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
9
|
+
*/
|
|
10
|
+
insertBeforeLayer?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Renders a button that will create a PDF version of the current map view (dimensions adjusted to fit Din A4 Paper).
|
|
14
|
+
*/
|
|
15
|
+
declare const MlCreatePdfButton: {
|
|
16
|
+
(props: MlCreatePdfButtonProps): JSX.Element;
|
|
17
|
+
defaultProps: {
|
|
18
|
+
mapId: undefined;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
export default MlCreatePdfButton;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default storyoptions;
|
|
2
|
+
export const ExampleConfig: any;
|
|
3
|
+
declare namespace storyoptions {
|
|
4
|
+
export const title: string;
|
|
5
|
+
export { MlCreatePdfButton as component };
|
|
6
|
+
export const argTypes: {};
|
|
7
|
+
export { mapContextDecorator as decorators };
|
|
8
|
+
}
|
|
9
|
+
import MlCreatePdfButton from "./MlCreatePdfButton";
|
|
10
|
+
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import "./MlFeatureEditor.css";
|
|
2
|
+
import "@mapbox/mapbox-gl-draw/dist/mapbox-gl-draw.css";
|
|
3
|
+
interface MlFeatureEditorProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id of the target MapLibre instance in mapContext
|
|
6
|
+
*/
|
|
7
|
+
mapId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
10
|
+
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
11
|
+
*/
|
|
12
|
+
insertBeforeLayer?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Input GeoJson data at initialization
|
|
15
|
+
*/
|
|
16
|
+
geojson?: any;
|
|
17
|
+
/**
|
|
18
|
+
* Callback function that is called each time the GeoJson data within has changed within MlFeatureEditor.
|
|
19
|
+
* First parameter is the new GeoJson feature.
|
|
20
|
+
*/
|
|
21
|
+
onChange?: Function;
|
|
22
|
+
/**
|
|
23
|
+
* Feature editor mode:
|
|
24
|
+
* - "custom_select" edit features
|
|
25
|
+
* - "custom_polygon" draw Polygon
|
|
26
|
+
* - "draw_point" draw Point
|
|
27
|
+
* - "draw_line_string" draw LineString
|
|
28
|
+
*/
|
|
29
|
+
mode?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* GeoJson Feature editor that allows to create or manipulate GeoJson data
|
|
33
|
+
*/
|
|
34
|
+
declare const MlFeatureEditor: (props: MlFeatureEditorProps) => JSX.Element;
|
|
35
|
+
export default MlFeatureEditor;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default storyoptions;
|
|
2
|
+
export const EditPolygon: any;
|
|
3
|
+
export const EditPoint: any;
|
|
4
|
+
export const EditLineString: any;
|
|
5
|
+
export const DrawPolygon: any;
|
|
6
|
+
export const DrawPoint: any;
|
|
7
|
+
export const DrawLineString: any;
|
|
8
|
+
declare namespace storyoptions {
|
|
9
|
+
export const title: string;
|
|
10
|
+
export { MlFeatureEditor as component };
|
|
11
|
+
export const argTypes: {};
|
|
12
|
+
export { mapContextDecorator as decorators };
|
|
13
|
+
}
|
|
14
|
+
import MlFeatureEditor from "./MlFeatureEditor";
|
|
15
|
+
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default DirectSelect;
|
|
2
|
+
declare namespace DirectSelect {
|
|
3
|
+
function fireUpdate(): void;
|
|
4
|
+
function fireActionable(state: any): void;
|
|
5
|
+
function startDragging(state: any, e: any): void;
|
|
6
|
+
function stopDragging(state: any): void;
|
|
7
|
+
function onVertex(state: any, e: any): void;
|
|
8
|
+
function onMidpoint(state: any, e: any): void;
|
|
9
|
+
function pathsToCoordinates(featureId: any, paths: any): any;
|
|
10
|
+
function onFeature(state: any, e: any): void;
|
|
11
|
+
function dragFeature(state: any, e: any, delta: any): void;
|
|
12
|
+
function dragVertex(state: any, e: any, delta: any): void;
|
|
13
|
+
function clickNoTarget(): void;
|
|
14
|
+
function clickInactive(): void;
|
|
15
|
+
function clickActiveFeature(state: any): void;
|
|
16
|
+
function onSetup(opts: any): {
|
|
17
|
+
featureId: any;
|
|
18
|
+
feature: any;
|
|
19
|
+
dragMoveLocation: any;
|
|
20
|
+
dragMoving: boolean;
|
|
21
|
+
canDragMove: boolean;
|
|
22
|
+
selectedCoordPaths: any[];
|
|
23
|
+
groupMove_vertices: any;
|
|
24
|
+
};
|
|
25
|
+
function onStop(): void;
|
|
26
|
+
function toDisplayFeatures(state: any, geojson: any, push: any): void;
|
|
27
|
+
function onTrash(state: any): void;
|
|
28
|
+
function onMouseMove(state: any, e: any): void;
|
|
29
|
+
function onMouseOut(state: any): void;
|
|
30
|
+
function onTouchStart(state: any, e: any): void;
|
|
31
|
+
function onMouseDown(state: any, e: any): void;
|
|
32
|
+
function onDrag(state: any, e: any): void;
|
|
33
|
+
function onClick(state: any, e: any): void;
|
|
34
|
+
function onTap(state: any, e: any): void;
|
|
35
|
+
function onTouchEnd(state: any): void;
|
|
36
|
+
function onMouseUp(state: any): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export default CustomPolygonMode;
|
|
2
|
+
declare namespace CustomPolygonMode {
|
|
3
|
+
function onSetup(): {
|
|
4
|
+
polygon: any;
|
|
5
|
+
currentVertexPosition: number;
|
|
6
|
+
};
|
|
7
|
+
function clickAnywhere(state: any, e: any): any;
|
|
8
|
+
function clickOnVertex(state: any): any;
|
|
9
|
+
function onMouseMove(state: any, e: any): void;
|
|
10
|
+
function onTap(state: any, e: any): any;
|
|
11
|
+
function onClick(state: any, e: any): any;
|
|
12
|
+
function onKeyUp(state: any, e: any): void;
|
|
13
|
+
function onStop(state: any): void;
|
|
14
|
+
function toDisplayFeatures(state: any, geojson: any, display: any): any;
|
|
15
|
+
function onTrash(state: any): void;
|
|
16
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export default CustomSelectMode;
|
|
2
|
+
declare namespace CustomSelectMode {
|
|
3
|
+
function onSetup(opts: any): {
|
|
4
|
+
dragMoveLocation: null;
|
|
5
|
+
boxSelectStartLocation: null;
|
|
6
|
+
boxSelectElement: undefined;
|
|
7
|
+
boxSelecting: boolean;
|
|
8
|
+
canBoxSelect: boolean;
|
|
9
|
+
dragMoving: boolean;
|
|
10
|
+
canDragMove: boolean;
|
|
11
|
+
initiallySelectedFeatureIds: any;
|
|
12
|
+
};
|
|
13
|
+
function fireUpdate(): void;
|
|
14
|
+
function fireActionable(): void;
|
|
15
|
+
function getUniqueIds(allFeatures: any): any;
|
|
16
|
+
function stopExtendedInteractions(state: any): void;
|
|
17
|
+
function onStop(): void;
|
|
18
|
+
function onMouseMove(state: any): void;
|
|
19
|
+
function onMouseOut(state: any): void;
|
|
20
|
+
function onTap(state: any, e: any): any;
|
|
21
|
+
function onClick(state: any, e: any): any;
|
|
22
|
+
function clickAnywhere(state: any): void;
|
|
23
|
+
function clickOnVertex(state: any, e: any): void;
|
|
24
|
+
function startOnActiveFeature(state: any, e: any): void;
|
|
25
|
+
function clickOnFeature(state: any, e: any): any;
|
|
26
|
+
function onMouseDown(state: any, e: any): void;
|
|
27
|
+
function startBoxSelect(state: any, e: any): void;
|
|
28
|
+
function onTouchStart(state: any, e: any): void;
|
|
29
|
+
function onDrag(state: any, e: any): void;
|
|
30
|
+
function whileBoxSelect(state: any, e: any): void;
|
|
31
|
+
function dragMove(state: any, e: any): void;
|
|
32
|
+
function onMouseUp(state: any, e: any): void;
|
|
33
|
+
function toDisplayFeatures(state: any, geojson: any, display: any): void;
|
|
34
|
+
function onTrash(): void;
|
|
35
|
+
function onCombineFeatures(): void;
|
|
36
|
+
function onUncombineFeatures(): void;
|
|
37
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export function isOfMetaType(type: any): (e: any) => boolean;
|
|
2
|
+
export function isShiftMousedown(e: any): boolean;
|
|
3
|
+
export function isActiveFeature(e: any): boolean;
|
|
4
|
+
export function isInactiveFeature(e: any): boolean;
|
|
5
|
+
export function noTarget(e: any): boolean;
|
|
6
|
+
export function isFeature(e: any): boolean;
|
|
7
|
+
export function isVertex(e: any): boolean;
|
|
8
|
+
export function isShiftDown(e: any): boolean;
|
|
9
|
+
export function isEscapeKey(e: any): boolean;
|
|
10
|
+
export function isEnterKey(e: any): boolean;
|
|
11
|
+
export function isTrue(): boolean;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
export namespace classes {
|
|
2
|
+
const CONTROL_BASE: string;
|
|
3
|
+
const CONTROL_PREFIX: string;
|
|
4
|
+
const CONTROL_BUTTON: string;
|
|
5
|
+
const CONTROL_BUTTON_LINE: string;
|
|
6
|
+
const CONTROL_BUTTON_POLYGON: string;
|
|
7
|
+
const CONTROL_BUTTON_POINT: string;
|
|
8
|
+
const CONTROL_BUTTON_TRASH: string;
|
|
9
|
+
const CONTROL_BUTTON_COMBINE_FEATURES: string;
|
|
10
|
+
const CONTROL_BUTTON_UNCOMBINE_FEATURES: string;
|
|
11
|
+
const CONTROL_GROUP: string;
|
|
12
|
+
const ATTRIBUTION: string;
|
|
13
|
+
const ACTIVE_BUTTON: string;
|
|
14
|
+
const BOX_SELECT: string;
|
|
15
|
+
}
|
|
16
|
+
export namespace sources {
|
|
17
|
+
const HOT: string;
|
|
18
|
+
const COLD: string;
|
|
19
|
+
}
|
|
20
|
+
export namespace cursors {
|
|
21
|
+
const ADD: string;
|
|
22
|
+
const MOVE: string;
|
|
23
|
+
const DRAG: string;
|
|
24
|
+
const POINTER: string;
|
|
25
|
+
const NONE: string;
|
|
26
|
+
}
|
|
27
|
+
export namespace types {
|
|
28
|
+
const POLYGON: string;
|
|
29
|
+
const LINE: string;
|
|
30
|
+
const POINT: string;
|
|
31
|
+
}
|
|
32
|
+
export namespace geojsonTypes {
|
|
33
|
+
export const FEATURE: string;
|
|
34
|
+
const POLYGON_1: string;
|
|
35
|
+
export { POLYGON_1 as POLYGON };
|
|
36
|
+
export const LINE_STRING: string;
|
|
37
|
+
const POINT_1: string;
|
|
38
|
+
export { POINT_1 as POINT };
|
|
39
|
+
export const FEATURE_COLLECTION: string;
|
|
40
|
+
export const MULTI_PREFIX: string;
|
|
41
|
+
export const MULTI_POINT: string;
|
|
42
|
+
export const MULTI_LINE_STRING: string;
|
|
43
|
+
export const MULTI_POLYGON: string;
|
|
44
|
+
}
|
|
45
|
+
export namespace modes {
|
|
46
|
+
const DRAW_LINE_STRING: string;
|
|
47
|
+
const DRAW_POLYGON: string;
|
|
48
|
+
const DRAW_POINT: string;
|
|
49
|
+
const SIMPLE_SELECT: string;
|
|
50
|
+
const DIRECT_SELECT: string;
|
|
51
|
+
const STATIC: string;
|
|
52
|
+
}
|
|
53
|
+
export namespace events {
|
|
54
|
+
const CREATE: string;
|
|
55
|
+
const DELETE: string;
|
|
56
|
+
const UPDATE: string;
|
|
57
|
+
const SELECTION_CHANGE: string;
|
|
58
|
+
const MODE_CHANGE: string;
|
|
59
|
+
const ACTIONABLE: string;
|
|
60
|
+
const RENDER: string;
|
|
61
|
+
const COMBINE_FEATURES: string;
|
|
62
|
+
const UNCOMBINE_FEATURES: string;
|
|
63
|
+
}
|
|
64
|
+
export namespace updateActions {
|
|
65
|
+
const MOVE_1: string;
|
|
66
|
+
export { MOVE_1 as MOVE };
|
|
67
|
+
export const CHANGE_COORDINATES: string;
|
|
68
|
+
}
|
|
69
|
+
export namespace meta {
|
|
70
|
+
const FEATURE_1: string;
|
|
71
|
+
export { FEATURE_1 as FEATURE };
|
|
72
|
+
export const MIDPOINT: string;
|
|
73
|
+
export const VERTEX: string;
|
|
74
|
+
}
|
|
75
|
+
export namespace activeStates {
|
|
76
|
+
const ACTIVE: string;
|
|
77
|
+
const INACTIVE: string;
|
|
78
|
+
}
|
|
79
|
+
export const interactions: string[];
|
|
80
|
+
export const LAT_MIN: -90;
|
|
81
|
+
export const LAT_RENDERED_MIN: -85;
|
|
82
|
+
export const LAT_MAX: 90;
|
|
83
|
+
export const LAT_RENDERED_MAX: 85;
|
|
84
|
+
export const LNG_MIN: -270;
|
|
85
|
+
export const LNG_MAX: 270;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export default create_midpoint;
|
|
2
|
+
declare function create_midpoint(parent: any, startVertex: any, endVertex: any): {
|
|
3
|
+
type: string;
|
|
4
|
+
properties: {
|
|
5
|
+
meta: string;
|
|
6
|
+
parent: any;
|
|
7
|
+
lng: number;
|
|
8
|
+
lat: number;
|
|
9
|
+
coord_path: any;
|
|
10
|
+
};
|
|
11
|
+
geometry: {
|
|
12
|
+
type: string;
|
|
13
|
+
coordinates: number[];
|
|
14
|
+
};
|
|
15
|
+
} | null;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default create_vertex;
|
|
2
|
+
/**
|
|
3
|
+
* Returns GeoJSON for a Point representing the
|
|
4
|
+
* vertex of another feature.
|
|
5
|
+
*
|
|
6
|
+
* @param {string} parentId
|
|
7
|
+
* @param {Array<number>} coordinates
|
|
8
|
+
* @param {string} path - Dot-separated numbers indicating exactly
|
|
9
|
+
* where the point exists within its parent feature's coordinates.
|
|
10
|
+
* @param {boolean} selected
|
|
11
|
+
* @return {GeoJSON} Point
|
|
12
|
+
*/
|
|
13
|
+
declare function create_vertex(parentId: string, coordinates: Array<number>, path: string, selected: boolean): GeoJSON;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
declare namespace _default {
|
|
2
|
+
export { featuresAtClick as click };
|
|
3
|
+
export { featuresAtTouch as touch };
|
|
4
|
+
}
|
|
5
|
+
export default _default;
|
|
6
|
+
declare function featuresAtClick(event: any, bbox: any, ctx: any): any;
|
|
7
|
+
declare function featuresAtTouch(event: any, bbox: any, ctx: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function getFeatureAtAndSetCursors(event: any, ctx: any): any;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function isClick(start: any, end: any, options?: {}): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export default mapEventToBoundingBox;
|
|
2
|
+
/**
|
|
3
|
+
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
+
* and licensed under ISC
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Returns a bounding box representing the event's location.
|
|
8
|
+
*
|
|
9
|
+
* @param {Event} mapEvent - Mapbox GL JS map event, with a point properties.
|
|
10
|
+
* @return {Array<Array<number>>} Bounding box.
|
|
11
|
+
*/
|
|
12
|
+
declare function mapEventToBoundingBox(mapEvent: Event, buffer?: number): Array<Array<number>>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export default ModeHandler;
|
|
2
|
+
/**
|
|
3
|
+
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
+
* and licensed under ISC
|
|
5
|
+
*/
|
|
6
|
+
declare function ModeHandler(mode: any, DrawContext: any): {
|
|
7
|
+
render: any;
|
|
8
|
+
stop(): void;
|
|
9
|
+
trash(): void;
|
|
10
|
+
combineFeatures(): void;
|
|
11
|
+
uncombineFeatures(): void;
|
|
12
|
+
drag(event: any): void;
|
|
13
|
+
click(event: any): void;
|
|
14
|
+
mousemove(event: any): void;
|
|
15
|
+
mousedown(event: any): void;
|
|
16
|
+
mouseup(event: any): void;
|
|
17
|
+
mouseout(event: any): void;
|
|
18
|
+
keydown(event: any): void;
|
|
19
|
+
keyup(event: any): void;
|
|
20
|
+
touchstart(event: any): void;
|
|
21
|
+
touchmove(event: any): void;
|
|
22
|
+
touchend(event: any): void;
|
|
23
|
+
tap(event: any): void;
|
|
24
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export default mouseEventPoint;
|
|
2
|
+
/**
|
|
3
|
+
* Returns a Point representing a mouse event's position
|
|
4
|
+
* relative to a containing element.
|
|
5
|
+
*
|
|
6
|
+
* @param {MouseEvent} mouseEvent
|
|
7
|
+
* @param {Node} container
|
|
8
|
+
* @returns {Point}
|
|
9
|
+
*/
|
|
10
|
+
declare function mouseEventPoint(mouseEvent: MouseEvent, container: Node): Point;
|
|
11
|
+
import Point from "@mapbox/point-geometry";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default StringSet;
|
|
2
|
+
/**
|
|
3
|
+
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
4
|
+
* and licensed under ISC
|
|
5
|
+
*/
|
|
6
|
+
declare function StringSet(items: any): void;
|
|
7
|
+
declare class StringSet {
|
|
8
|
+
/**
|
|
9
|
+
* Code from https://github.com/mapbox/mapbox-gl-draw
|
|
10
|
+
* and licensed under ISC
|
|
11
|
+
*/
|
|
12
|
+
constructor(items: any);
|
|
13
|
+
_items: {};
|
|
14
|
+
_nums: {};
|
|
15
|
+
_length: any;
|
|
16
|
+
add(x: any): StringSet;
|
|
17
|
+
delete(x: any): StringSet;
|
|
18
|
+
has(x: any): boolean;
|
|
19
|
+
values(): any[];
|
|
20
|
+
clear(): StringSet;
|
|
21
|
+
}
|