@mapcomponents/react-maplibre 0.1.48 → 0.1.52

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (346) hide show
  1. package/.github/workflows/node_version_test.yml +2 -1
  2. package/CHANGELOG.md +22 -1
  3. package/README.md +61 -150
  4. package/coverage/clover.xml +269 -246
  5. package/coverage/coverage-final.json +10 -9
  6. package/coverage/lcov-report/index.html +49 -34
  7. package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +25 -25
  8. package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
  9. package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +343 -0
  10. package/coverage/lcov-report/src/components/MlCenterPosition/index.html +116 -0
  11. package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +1 -1
  12. package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
  13. package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +69 -63
  14. package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +18 -18
  15. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
  17. package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
  18. package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
  19. package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +1 -1
  20. package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +1 -1
  21. package/coverage/lcov-report/src/components/MlGPXViewer/index.html +1 -1
  22. package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +26 -11
  23. package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
  24. package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +1 -1
  25. package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +1 -1
  26. package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
  27. package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
  28. package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +1 -1
  29. package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
  30. package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +1 -1
  31. package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +1 -1
  32. package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
  33. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +1 -1
  34. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
  35. package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
  36. package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
  37. package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
  38. package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
  39. package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
  40. package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
  41. package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
  42. package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +106 -34
  43. package/coverage/lcov-report/src/components/MlNavigationTools/index.html +15 -15
  44. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
  45. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
  46. package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
  47. package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
  48. package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
  49. package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
  50. package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
  51. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +1 -1
  52. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +1 -1
  53. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
  54. package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
  55. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +22 -19
  56. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
  57. package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
  58. package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
  59. package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +1 -1
  60. package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +1 -1
  61. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
  62. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
  63. package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +1 -1
  64. package/coverage/lcov-report/src/components/MlWmsLayer/index.html +1 -1
  65. package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +1 -1
  66. package/coverage/lcov-report/src/components/MlWmsLoader/index.html +1 -1
  67. package/coverage/lcov-report/src/contexts/MapContext.tsx.html +23 -23
  68. package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
  69. package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
  70. package/coverage/lcov-report/src/contexts/index.html +1 -1
  71. package/coverage/lcov-report/src/hooks/index.html +15 -15
  72. package/coverage/lcov-report/src/hooks/useLayer.ts.html +78 -69
  73. package/coverage/lcov-report/src/hooks/useMap.ts.html +25 -25
  74. package/coverage/lcov-report/src/hooks/useMapState.ts.html +28 -28
  75. package/coverage/lcov-report/src/hooks/useWms.js.html +1 -1
  76. package/coverage/lcov-report/src/index.html +1 -1
  77. package/coverage/lcov-report/src/index.ts.html +1 -1
  78. package/coverage/lcov.info +544 -494
  79. package/dist/components/MapLibreMap/MapLibreMap.d.ts +31 -0
  80. package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +15 -0
  81. package/dist/components/MapLibreMap/MapLibreMap.test.d.ts +1 -0
  82. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +76 -0
  83. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.test.d.ts +1 -0
  84. package/dist/components/MlBasicComponent.d.ts +5 -0
  85. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +50 -0
  86. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +17 -0
  87. package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +22 -0
  88. package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +10 -0
  89. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +21 -0
  90. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +10 -0
  91. package/dist/components/MlCreatePdfButton/lib/createPdf.d.ts +2 -0
  92. package/dist/components/MlCreatePdfButton/lib/nominatimMap.d.ts +2 -0
  93. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +35 -0
  94. package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +15 -0
  95. package/dist/components/MlFeatureEditor/MlFeatureEditor.test.d.ts +1 -0
  96. package/dist/components/MlFeatureEditor/custom-direct-select-mode.d.ts +37 -0
  97. package/dist/components/MlFeatureEditor/custom-polygon-mode.d.ts +16 -0
  98. package/dist/components/MlFeatureEditor/custom-select-mode.d.ts +37 -0
  99. package/dist/components/MlFeatureEditor/lib/common_selectors.d.ts +11 -0
  100. package/dist/components/MlFeatureEditor/lib/constants.d.ts +85 -0
  101. package/dist/components/MlFeatureEditor/lib/constrain_feature_movement.d.ts +2 -0
  102. package/dist/components/MlFeatureEditor/lib/create_midpoint.d.ts +15 -0
  103. package/dist/components/MlFeatureEditor/lib/create_supplementary_points.d.ts +2 -0
  104. package/dist/components/MlFeatureEditor/lib/create_vertex.d.ts +13 -0
  105. package/dist/components/MlFeatureEditor/lib/double_click_zoom.d.ts +7 -0
  106. package/dist/components/MlFeatureEditor/lib/euclidean_distance.d.ts +5 -0
  107. package/dist/components/MlFeatureEditor/lib/features_at.d.ts +7 -0
  108. package/dist/components/MlFeatureEditor/lib/get_features_and_set_cursor.d.ts +1 -0
  109. package/dist/components/MlFeatureEditor/lib/is_click.d.ts +1 -0
  110. package/dist/components/MlFeatureEditor/lib/is_event_at_coordinates.d.ts +6 -0
  111. package/dist/components/MlFeatureEditor/lib/is_tap.d.ts +3 -0
  112. package/dist/components/MlFeatureEditor/lib/map_event_to_bounding_box.d.ts +12 -0
  113. package/dist/components/MlFeatureEditor/lib/mode_handler.d.ts +24 -0
  114. package/dist/components/MlFeatureEditor/lib/mouse_event_point.d.ts +11 -0
  115. package/dist/components/MlFeatureEditor/lib/move_features.d.ts +2 -0
  116. package/dist/components/MlFeatureEditor/lib/sort_features.d.ts +2 -0
  117. package/dist/components/MlFeatureEditor/lib/string_set.d.ts +21 -0
  118. package/dist/components/MlFeatureEditor/lib/string_sets_are_equal.d.ts +5 -0
  119. package/dist/components/MlFeatureEditor/lib/theme.d.ts +88 -0
  120. package/dist/components/MlFeatureEditor/lib/to_dense_array.d.ts +12 -0
  121. package/dist/components/MlFeatureEditor/lib/utils.d.ts +10 -0
  122. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +61 -0
  123. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +10 -0
  124. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.test.d.ts +1 -0
  125. package/dist/components/MlFollowGps/MlFollowGps.d.ts +80 -0
  126. package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +10 -0
  127. package/dist/components/MlFollowGps/MlFollowGps.test.d.ts +1 -0
  128. package/dist/components/MlGPXViewer/MlGPXViewer.d.ts +29 -0
  129. package/dist/components/MlGPXViewer/MlGPXViewer.stories.d.ts +16 -0
  130. package/dist/components/MlGPXViewer/MlGPXViewer.test.d.ts +1 -0
  131. package/dist/components/MlGPXViewer/gpxConverter.d.ts +11 -0
  132. package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +10 -0
  133. package/dist/components/MlGPXViewer/util/GeoJsonProvider.d.ts +4 -0
  134. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +76 -0
  135. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +12 -0
  136. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.test.d.ts +1 -0
  137. package/dist/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +2 -0
  138. package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +2 -0
  139. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +29 -0
  140. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +10 -0
  141. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.test.d.ts +1 -0
  142. package/dist/components/MlLayer/MlLayer.d.ts +26 -0
  143. package/dist/components/MlLayer/MlLayer.stories.d.ts +10 -0
  144. package/dist/components/MlLayer/MlLayer.test.d.ts +1 -0
  145. package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +27 -0
  146. package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +10 -0
  147. package/dist/components/MlLayerMagnify/MlLayerMagnify.test.d.ts +1 -0
  148. package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +16 -0
  149. package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +11 -0
  150. package/dist/components/MlLayerSwipe/MlLayerSwipe.test.d.ts +1 -0
  151. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +30 -0
  152. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.stories.d.ts +13 -0
  153. package/dist/components/MlLayerSwitcher/components/LayerBox.d.ts +6 -0
  154. package/dist/components/MlMarker/MlMarker.d.ts +33 -0
  155. package/dist/components/MlMarker/MlMarker.stories.d.ts +9 -0
  156. package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +20 -0
  157. package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +11 -0
  158. package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +47 -0
  159. package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +10 -0
  160. package/dist/components/MlNavigationCompass/MlNavigationCompass.test.d.ts +1 -0
  161. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +31 -0
  162. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +13 -0
  163. package/dist/components/MlOsmLayer/MlOsmLayer.d.ts +18 -0
  164. package/dist/components/MlOsmLayer/MlOsmLayer.stories_.d.ts +16 -0
  165. package/dist/components/MlOsmLayer/MlOsmLayer.test.d.ts +1 -0
  166. package/dist/components/MlScaleReference/MlScaleReference.d.ts +2 -0
  167. package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +14 -0
  168. package/dist/components/MlShareMapState/MlShareMapState.d.ts +22 -0
  169. package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +10 -0
  170. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +20 -0
  171. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +16 -0
  172. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.d.ts +1 -0
  173. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +15 -0
  174. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +16 -0
  175. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.test.d.ts +1 -0
  176. package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +17 -0
  177. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +73 -0
  178. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +13 -0
  179. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.test.d.ts +1 -0
  180. package/dist/components/MlTransitionGeoJsonLayer/util/transitionFunctions.d.ts +2 -0
  181. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +22 -0
  182. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.stories.d.ts +13 -0
  183. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +37 -0
  184. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.stories.d.ts +13 -0
  185. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.test.d.ts +1 -0
  186. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +22 -0
  187. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +13 -0
  188. package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +100 -0
  189. package/dist/components/MlWmsLayer/MlWmsLayer.stories.d.ts +13 -0
  190. package/dist/components/MlWmsLayer/MlWmsLayer.test.d.ts +1 -0
  191. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +48 -0
  192. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +13 -0
  193. package/dist/contexts/MapComponentsProvider.test.d.ts +1 -0
  194. package/dist/contexts/MapContext.d.ts +13 -0
  195. package/dist/contexts/SimpleDataContext.d.ts +4 -0
  196. package/dist/contexts/SimpleDataProvider.d.ts +8 -0
  197. package/dist/contexts/SimpleDataProvider.test.d.ts +1 -0
  198. package/dist/custom.d.d.ts +22 -0
  199. package/dist/decorators/MapContextDecorator.d.ts +2 -0
  200. package/dist/decorators/MultiMapContextDecorator.d.ts +2 -0
  201. package/dist/hooks/useLayer.d.ts +26 -0
  202. package/dist/hooks/useLayer.test.d.ts +1 -0
  203. package/dist/hooks/useMap.d.ts +14 -0
  204. package/dist/hooks/useMapState.d.ts +62 -0
  205. package/dist/hooks/useMapState.stories.d.ts +14 -0
  206. package/dist/hooks/useWms.d.ts +18 -0
  207. package/dist/index.d.ts +32 -0
  208. package/dist/index.esm.js +96 -33
  209. package/dist/index.esm.js.map +1 -1
  210. package/dist/setupTests.d.ts +12 -0
  211. package/dist/stories/components/Readme.d.ts +2 -0
  212. package/dist/ui_components/ImageLoader.d.ts +2 -0
  213. package/dist/ui_components/Legend.d.ts +1 -0
  214. package/dist/ui_components/LoadingOverlay.d.ts +2 -0
  215. package/dist/ui_components/LoadingOverlayContext.d.ts +11 -0
  216. package/dist/ui_components/Sidebar.d.ts +1 -0
  217. package/dist/ui_components/Tooltip.d.ts +1 -0
  218. package/dist/ui_components/TopToolbar.d.ts +1 -0
  219. package/dist/util/index.d.ts +3 -0
  220. package/dist/util/layerRemovalTest.d.ts +2 -0
  221. package/dist/util/sourceRemovalTest.d.ts +2 -0
  222. package/package.json +2 -1
  223. package/scripts/create-map-component.sh +2 -2
  224. package/src/components/MapLibreMap/MapLibreMap.tsx +1 -1
  225. package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +4 -3
  226. package/src/components/MlCenterPosition/MlCenterPosition.doc.de.md +3 -0
  227. package/src/components/MlCenterPosition/MlCenterPosition.meta_.json +15 -0
  228. package/src/components/MlCenterPosition/MlCenterPosition.stories.js +21 -0
  229. package/src/components/MlCenterPosition/MlCenterPosition.tsx +86 -0
  230. package/src/components/MlFeatureEditor/MlFeatureEditor.stories.js +1 -2
  231. package/src/components/MlFeatureEditor/MlFeatureEditor.test.js +3 -3
  232. package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +37 -35
  233. package/src/components/MlFeatureEditor/lib/utils.js +1 -2
  234. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +14 -9
  235. package/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.ts +2 -1
  236. package/src/components/MlNavigationTools/MlNavigationTools.stories.js +3 -2
  237. package/src/components/MlNavigationTools/MlNavigationTools.tsx +44 -20
  238. package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +18 -17
  239. package/src/components/MlWmsLoader/MlWmsLoader.stories.js +1 -1
  240. package/src/hooks/useLayer.test.js +205 -0
  241. package/src/hooks/useLayer.ts +11 -8
  242. package/tsconfig.json +35 -7
  243. package/docs-build/0.20735a16c2ad9677fe7d.manager.bundle.js +0 -1
  244. package/docs-build/0.968bdc5f.iframe.bundle.js +0 -2
  245. package/docs-build/0.968bdc5f.iframe.bundle.js.map +0 -1
  246. package/docs-build/1.3530bc86.iframe.bundle.js +0 -10
  247. package/docs-build/1.3530bc86.iframe.bundle.js.map +0 -1
  248. package/docs-build/17.c96fb6bc.iframe.bundle.js +0 -2
  249. package/docs-build/17.c96fb6bc.iframe.bundle.js.map +0 -1
  250. package/docs-build/18.0947f810.iframe.bundle.js +0 -17
  251. package/docs-build/18.0947f810.iframe.bundle.js.map +0 -1
  252. package/docs-build/19.44204e5a.iframe.bundle.js +0 -14
  253. package/docs-build/19.44204e5a.iframe.bundle.js.map +0 -1
  254. package/docs-build/2.c62e9630.iframe.bundle.js +0 -2
  255. package/docs-build/2.c62e9630.iframe.bundle.js.map +0 -1
  256. package/docs-build/20.50a2ad76.iframe.bundle.js +0 -2
  257. package/docs-build/20.50a2ad76.iframe.bundle.js.map +0 -1
  258. package/docs-build/21.ce55b70e.iframe.bundle.js +0 -4
  259. package/docs-build/21.ce55b70e.iframe.bundle.js.map +0 -1
  260. package/docs-build/22.639c6bb4.iframe.bundle.js +0 -22
  261. package/docs-build/22.639c6bb4.iframe.bundle.js.map +0 -1
  262. package/docs-build/3.afb0e0a5.iframe.bundle.js +0 -2
  263. package/docs-build/3.afb0e0a5.iframe.bundle.js.map +0 -1
  264. package/docs-build/4.8ac31bba1926f4f011b0.manager.bundle.js +0 -2
  265. package/docs-build/4.8ac31bba1926f4f011b0.manager.bundle.js.LICENSE.txt +0 -8
  266. package/docs-build/5.daf044a6c0f55d839078.manager.bundle.js +0 -1
  267. package/docs-build/6.99fba2cf6af0473f8209.manager.bundle.js +0 -2
  268. package/docs-build/6.99fba2cf6af0473f8209.manager.bundle.js.LICENSE.txt +0 -12
  269. package/docs-build/7.b6a48b90f61cb575c2e4.manager.bundle.js +0 -1
  270. package/docs-build/8.50518a5391398d9d5812.manager.bundle.js +0 -1
  271. package/docs-build/assets/3D/godzilla_simple.glb +0 -0
  272. package/docs-build/assets/dop.png +0 -0
  273. package/docs-build/assets/historic.png +0 -0
  274. package/docs-build/assets/marker.png +0 -0
  275. package/docs-build/assets/osm.png +0 -0
  276. package/docs-build/assets/sample.gpx +0 -716
  277. package/docs-build/catalogue/.gitkeep +0 -0
  278. package/docs-build/catalogue/mc_meta.json +0 -1
  279. package/docs-build/favicon.ico +0 -0
  280. package/docs-build/iframe.html +0 -348
  281. package/docs-build/index.html +0 -59
  282. package/docs-build/logo.png +0 -0
  283. package/docs-build/main.ef9704b1252e8efa56a0.manager.bundle.js +0 -1
  284. package/docs-build/main~24120820.e956ad2c.iframe.bundle.js +0 -2
  285. package/docs-build/main~24120820.e956ad2c.iframe.bundle.js.map +0 -1
  286. package/docs-build/manifest.json +0 -25
  287. package/docs-build/robots.txt +0 -3
  288. package/docs-build/runtime~main.6e6ed7dc9ea4785ef286.manager.bundle.js +0 -1
  289. package/docs-build/static/media/mapcomponents_logo.98b01a05.png +0 -0
  290. package/docs-build/static/media/wg-marker.bf3eeb2d.png +0 -0
  291. package/docs-build/thumbnails/MapLibreMap.png +0 -0
  292. package/docs-build/thumbnails/MlCameraFollowPath.png +0 -0
  293. package/docs-build/thumbnails/MlCreatePdfButton.png +0 -0
  294. package/docs-build/thumbnails/MlDeckGlLayer.png +0 -0
  295. package/docs-build/thumbnails/MlDeckGlTerrainLayer.png +0 -0
  296. package/docs-build/thumbnails/MlDemoDashboard.png +0 -0
  297. package/docs-build/thumbnails/MlFeatureEditor.png +0 -0
  298. package/docs-build/thumbnails/MlFillExtrusionLayer.png +0 -0
  299. package/docs-build/thumbnails/MlFollowGps.png +0 -0
  300. package/docs-build/thumbnails/MlGPXViewer.png +0 -0
  301. package/docs-build/thumbnails/MlGeoJsonLayer.png +0 -0
  302. package/docs-build/thumbnails/MlHillshadeLayer.png +0 -0
  303. package/docs-build/thumbnails/MlIconLayer.png +0 -0
  304. package/docs-build/thumbnails/MlLaermkarte.png +0 -0
  305. package/docs-build/thumbnails/MlLayerMagnify.png +0 -0
  306. package/docs-build/thumbnails/MlLayerSwipe.png +0 -0
  307. package/docs-build/thumbnails/MlMapDrawTools.png +0 -0
  308. package/docs-build/thumbnails/MlMeasureTool.png +0 -0
  309. package/docs-build/thumbnails/MlMobilerImker.png +0 -0
  310. package/docs-build/thumbnails/MlNavigationCompass.png +0 -0
  311. package/docs-build/thumbnails/MlNavigationTools.png +0 -0
  312. package/docs-build/thumbnails/MlOsmLayer.png +0 -0
  313. package/docs-build/thumbnails/MlScaleReference.png +0 -0
  314. package/docs-build/thumbnails/MlSpatialElevationProfile.png +0 -0
  315. package/docs-build/thumbnails/MlThreeJsLayer.png +0 -0
  316. package/docs-build/thumbnails/MlTransitionGeoJsonLayer.png +0 -0
  317. package/docs-build/thumbnails/MlVectorTileLayer.png +0 -0
  318. package/docs-build/thumbnails/MlWanderApp.png +0 -0
  319. package/docs-build/thumbnails/MlWmsLayer.png +0 -0
  320. package/docs-build/thumbnails/MlWmsLoader.png +0 -0
  321. package/docs-build/vendors~main.4b570b3072ba06ee44b5.manager.bundle.js +0 -2
  322. package/docs-build/vendors~main.4b570b3072ba06ee44b5.manager.bundle.js.LICENSE.txt +0 -104
  323. package/docs-build/vendors~main~0ad7406a.834c9ace.iframe.bundle.js +0 -8
  324. package/docs-build/vendors~main~0ad7406a.834c9ace.iframe.bundle.js.map +0 -1
  325. package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js +0 -2
  326. package/docs-build/vendors~main~0f485567.7297d057.iframe.bundle.js.map +0 -1
  327. package/docs-build/vendors~main~41a6ab2c.19d97527.iframe.bundle.js +0 -2
  328. package/docs-build/vendors~main~41a6ab2c.19d97527.iframe.bundle.js.map +0 -1
  329. package/docs-build/vendors~main~52589227.cebbe724.iframe.bundle.js +0 -8
  330. package/docs-build/vendors~main~52589227.cebbe724.iframe.bundle.js.map +0 -1
  331. package/docs-build/vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js +0 -2
  332. package/docs-build/vendors~main~57c1f6cb.8a8dd47e.iframe.bundle.js.map +0 -1
  333. package/docs-build/vendors~main~73914085.2e61c0dc.iframe.bundle.js +0 -293
  334. package/docs-build/vendors~main~73914085.2e61c0dc.iframe.bundle.js.map +0 -1
  335. package/docs-build/vendors~main~9c5b28f6.32356887.iframe.bundle.js +0 -7
  336. package/docs-build/vendors~main~9c5b28f6.32356887.iframe.bundle.js.map +0 -1
  337. package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js +0 -21
  338. package/docs-build/vendors~main~b5906859.94dc520a.iframe.bundle.js.map +0 -1
  339. package/docs-build/vendors~main~b8f44717.8669cfb8.iframe.bundle.js +0 -89
  340. package/docs-build/vendors~main~b8f44717.8669cfb8.iframe.bundle.js.map +0 -1
  341. package/docs-build/vendors~main~b9cf3951.2a2025c3.iframe.bundle.js +0 -63
  342. package/docs-build/vendors~main~b9cf3951.2a2025c3.iframe.bundle.js.map +0 -1
  343. package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js +0 -2
  344. package/docs-build/vendors~main~d939e436.bb2b0303.iframe.bundle.js.map +0 -1
  345. package/docs-build/vendors~main~f420d588.3481b43e.iframe.bundle.js +0 -107
  346. package/docs-build/vendors~main~f420d588.3481b43e.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,76 @@
1
+ import { IControl, MapOptions as MapOptionsType } from "!maplibre-gl";
2
+ import { Map as MapType } from "maplibre-gl";
3
+ declare type EventArgArray = [string, string | Function, Function?];
4
+ declare type LayerState = {
5
+ id: string;
6
+ type: string;
7
+ visible: boolean;
8
+ baseLayer: boolean;
9
+ };
10
+ declare type ViewportState = {
11
+ center: {
12
+ lng: number;
13
+ lat: number;
14
+ };
15
+ zoom: number;
16
+ bearing: number;
17
+ pitch: number;
18
+ };
19
+ /**
20
+ * 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.
21
+ *
22
+ * @param {object} props
23
+ *
24
+ * @class
25
+ */
26
+ declare class MapLibreGlWrapper {
27
+ registeredElements: {
28
+ [key: string]: {
29
+ layers: [string?];
30
+ sources: [string?];
31
+ images: [string?];
32
+ controls: [IControl?];
33
+ events: [EventArgArray?];
34
+ wrapperEvents: [EventArgArray?];
35
+ };
36
+ };
37
+ baseLayers: [string?];
38
+ firstSymbolLayer: string | undefined;
39
+ eventHandlers: {
40
+ layerchange: [Function?];
41
+ viewportchange: [Function?];
42
+ };
43
+ wrapper: {
44
+ on: Function;
45
+ off: Function;
46
+ fire: Function;
47
+ layerState: [LayerState?];
48
+ layerStateString: string;
49
+ oldLayerStateStrings: object;
50
+ buildLayerObject: Function;
51
+ buildLayerObjects: Function;
52
+ refreshLayerState: Function;
53
+ viewportState: ViewportState;
54
+ viewportStateString: string;
55
+ oldViewportStateString: string;
56
+ getViewport: Function;
57
+ refreshViewport: Function;
58
+ };
59
+ initRegisteredElements: Function;
60
+ addNativeMaplibreFunctionsAndProps: Function;
61
+ map: MapType;
62
+ style: object;
63
+ styleJson: object;
64
+ addLayer: Function;
65
+ addSource: Function;
66
+ addControl: Function;
67
+ addImage: Function;
68
+ on: Function;
69
+ cleanup: Function;
70
+ constructor(props: {
71
+ mapOptions: MapOptionsType;
72
+ onReady: Function;
73
+ });
74
+ }
75
+ export default MapLibreGlWrapper;
76
+ export type { LayerState, ViewportState };
@@ -0,0 +1,5 @@
1
+ export default MlBasicComponent;
2
+ /**
3
+ * This component is deprecated and will be removed in the next major release
4
+ */
5
+ declare function MlBasicComponent(props: any): JSX.Element;
@@ -0,0 +1,50 @@
1
+ interface MlCenterPositionProps {
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
+ * Active button font color
13
+ */
14
+ onColor?: string;
15
+ /**
16
+ * Inactive button font color
17
+ */
18
+ offColor?: string;
19
+ /**
20
+ * CSS style object that is applied to the button component
21
+ */
22
+ style?: any;
23
+ }
24
+ /**
25
+ * Component template
26
+ *
27
+ */
28
+ declare const MlCenterPosition: {
29
+ (props: MlCenterPositionProps): JSX.Element;
30
+ defaultProps: {
31
+ mapId: undefined;
32
+ style: {
33
+ minWidth: string;
34
+ minHeight: string;
35
+ width: string;
36
+ height: string;
37
+ backgroundColor: string;
38
+ borderRadius: string;
39
+ margin: number;
40
+ fontSize: string;
41
+ ":hover": {
42
+ backgroundColor: string;
43
+ color: string;
44
+ };
45
+ };
46
+ onColor: string;
47
+ offColor: string;
48
+ };
49
+ };
50
+ export default MlCenterPosition;
@@ -0,0 +1,17 @@
1
+ export default storyoptions;
2
+ export const ExampleConfig: any;
3
+ declare namespace storyoptions {
4
+ export const title: string;
5
+ export { MlCenterPosition as component };
6
+ export const argTypes: {};
7
+ export { mapContextDecorator as decorators };
8
+ export namespace parameters {
9
+ namespace docs {
10
+ namespace source {
11
+ const type: string;
12
+ }
13
+ }
14
+ }
15
+ }
16
+ import MlCenterPosition from "./MlCenterPosition";
17
+ import mapContextDecorator from "../../decorators/MapContextDecorator";
@@ -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,2 @@
1
+ declare const createPdf: Function;
2
+ export default createPdf;
@@ -0,0 +1,2 @@
1
+ declare const nmConverter: Function;
2
+ export default nmConverter;
@@ -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,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,2 @@
1
+ export default constrain_feature_movement;
2
+ declare function constrain_feature_movement(geojsonFeatures: any, delta: any): any;
@@ -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,2 @@
1
+ export default createSupplementaryPoints;
2
+ declare function createSupplementaryPoints(geojson: any, options?: {}, basePath?: null): GeoJSON[];
@@ -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
+ export default doubleClickZoom;
2
+ declare namespace doubleClickZoom {
3
+ function enable(ctx: any): void;
4
+ function enable(ctx: any): void;
5
+ function disable(ctx: any): void;
6
+ function disable(ctx: any): void;
7
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Code from https://github.com/mapbox/mapbox-gl-draw
3
+ * and licensed under ISC
4
+ */
5
+ export default function _default(a: any, b: any): number;
@@ -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,6 @@
1
+ export default isEventAtCoordinates;
2
+ /**
3
+ * Code from https://github.com/mapbox/mapbox-gl-draw
4
+ * and licensed under ISC
5
+ */
6
+ declare function isEventAtCoordinates(event: any, coordinates: any): boolean;
@@ -0,0 +1,3 @@
1
+ export default function isTap(start: any, end: any, options?: {}): boolean;
2
+ export const TAP_TOLERANCE: 25;
3
+ export const TAP_INTERVAL: 250;
@@ -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";