@mapcomponents/react-maplibre 0.1.63 → 0.1.64

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 (294) hide show
  1. package/.editorconfig +1 -1
  2. package/.eslintrc.js +9 -6
  3. package/.github/workflows/check-catalogue-metadata-schema.yml +19 -0
  4. package/CHANGELOG.md +27 -2
  5. package/coverage/clover.xml +671 -1032
  6. package/coverage/coverage-final.json +24 -21
  7. package/coverage/lcov-report/index.html +112 -82
  8. package/coverage/lcov-report/src/components/MapLibreMap/MapLibreMap.tsx.html +24 -24
  9. package/coverage/lcov-report/src/components/MapLibreMap/index.html +1 -1
  10. package/coverage/lcov-report/src/components/MlCenterPosition/MlCenterPosition.tsx.html +5 -5
  11. package/coverage/lcov-report/src/components/MlCenterPosition/index.html +1 -1
  12. package/coverage/lcov-report/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx.html +2 -2
  13. package/coverage/lcov-report/src/components/MlCreatePdfButton/index.html +1 -1
  14. package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.cy.tsx.html +1 -1
  15. package/coverage/lcov-report/src/components/MlCreatePdfForm/MlCreatePdfForm.tsx.html +1 -1
  16. package/coverage/lcov-report/src/components/MlCreatePdfForm/index.html +1 -1
  17. package/coverage/lcov-report/src/components/MlFeatureEditor/MlFeatureEditor.tsx.html +2 -5
  18. package/coverage/lcov-report/src/components/MlFeatureEditor/index.html +1 -1
  19. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.tsx.html +1 -1
  20. package/coverage/lcov-report/src/components/MlFillExtrusionLayer/index.html +1 -1
  21. package/coverage/lcov-report/src/components/MlFollowGps/MlFollowGps.tsx.html +1 -1
  22. package/coverage/lcov-report/src/components/MlFollowGps/index.html +1 -1
  23. package/coverage/lcov-report/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx.html +40 -19
  24. package/coverage/lcov-report/src/components/MlGeoJsonLayer/index.html +1 -1
  25. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.js.html +1 -1
  26. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.js.html +1 -1
  27. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx.html +112 -0
  28. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx.html +115 -0
  29. package/coverage/lcov-report/src/components/MlGeoJsonLayer/story_utils/index.html +34 -4
  30. package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.tsx.html +1 -1
  31. package/coverage/lcov-report/src/components/MlGeojsonLayerWithSource/index.html +1 -1
  32. package/coverage/lcov-report/src/components/MlGpxViewer/MlGpxViewer.tsx.html +394 -0
  33. package/coverage/lcov-report/src/components/{MlGPXViewer → MlGpxViewer}/index.html +23 -38
  34. package/coverage/lcov-report/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx.html +63 -285
  35. package/coverage/lcov-report/src/components/MlImageMarkerLayer/index.html +21 -21
  36. package/coverage/lcov-report/src/components/MlLayer/MlLayer.tsx.html +1 -1
  37. package/coverage/lcov-report/src/components/MlLayer/index.html +1 -1
  38. package/coverage/lcov-report/src/components/MlLayerMagnify/MlLayerMagnify.tsx.html +58 -76
  39. package/coverage/lcov-report/src/components/MlLayerMagnify/index.html +1 -1
  40. package/coverage/lcov-report/src/components/MlLayerSwipe/MlLayerSwipe.tsx.html +58 -61
  41. package/coverage/lcov-report/src/components/MlLayerSwipe/index.html +11 -11
  42. package/coverage/lcov-report/src/components/MlLayerSwitcher/MlLayerSwitcher.js.html +1 -1
  43. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/LayerBox.js.html +30 -21
  44. package/coverage/lcov-report/src/components/MlLayerSwitcher/components/index.html +1 -1
  45. package/coverage/lcov-report/src/components/MlLayerSwitcher/index.html +1 -1
  46. package/coverage/lcov-report/src/components/MlMarker/MlMarker.tsx.html +1 -1
  47. package/coverage/lcov-report/src/components/MlMarker/index.html +1 -1
  48. package/coverage/lcov-report/src/components/MlMeasureTool/MlMeasureTool.tsx.html +1 -1
  49. package/coverage/lcov-report/src/components/MlMeasureTool/index.html +1 -1
  50. package/coverage/lcov-report/src/components/MlNavigationCompass/MlNavigationCompass.tsx.html +1 -1
  51. package/coverage/lcov-report/src/components/MlNavigationCompass/index.html +1 -1
  52. package/coverage/lcov-report/src/components/MlNavigationTools/MlNavigationTools.tsx.html +1 -1
  53. package/coverage/lcov-report/src/components/MlNavigationTools/index.html +1 -1
  54. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.js.html +1 -1
  55. package/coverage/lcov-report/src/components/MlOsmLayer/MlOsmLayer.stories_.js.html +1 -1
  56. package/coverage/lcov-report/src/components/MlOsmLayer/index.html +1 -1
  57. package/coverage/lcov-report/src/components/MlScaleReference/MlScaleReference.js.html +1 -1
  58. package/coverage/lcov-report/src/components/MlScaleReference/index.html +1 -1
  59. package/coverage/lcov-report/src/components/MlShareMapState/MlShareMapState.js.html +1 -1
  60. package/coverage/lcov-report/src/components/MlShareMapState/index.html +1 -1
  61. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/ColorPicker.tsx.html +1 -1
  62. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerList.tsx.html +1 -1
  63. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerListItem.tsx.html +1 -1
  64. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/LayerPropertyForm.tsx.html +1 -1
  65. package/coverage/lcov-report/src/components/MlSketchTool/LayerList/index.html +1 -1
  66. package/coverage/lcov-report/src/components/MlSketchTool/MlSketchTool.tsx.html +1 -1
  67. package/coverage/lcov-report/src/components/MlSketchTool/index.html +1 -1
  68. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx.html +514 -0
  69. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/index.html +21 -21
  70. package/coverage/lcov-report/src/components/MlThreeJsLayer/MlThreeJsLayer.js.html +1 -1
  71. package/coverage/lcov-report/src/components/MlThreeJsLayer/index.html +1 -1
  72. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx.html +20 -206
  73. package/coverage/lcov-report/src/components/MlTransitionGeoJsonLayer/index.html +1 -1
  74. package/coverage/lcov-report/src/components/MlUseMapDebugger/MlUseMapDebugger.js.html +1 -1
  75. package/coverage/lcov-report/src/components/MlUseMapDebugger/index.html +1 -1
  76. package/coverage/lcov-report/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx.html +10 -7
  77. package/coverage/lcov-report/src/components/MlVectorTileLayer/index.html +5 -5
  78. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.js.html +1 -1
  79. package/coverage/lcov-report/src/components/MlWmsFeatureInfoPopup/index.html +1 -1
  80. package/coverage/lcov-report/src/components/MlWmsLayer/MlWmsLayer.tsx.html +111 -57
  81. package/coverage/lcov-report/src/components/MlWmsLayer/index.html +19 -19
  82. package/coverage/lcov-report/src/components/MlWmsLoader/MlWmsLoader.tsx.html +201 -144
  83. package/coverage/lcov-report/src/components/MlWmsLoader/index.html +9 -9
  84. package/coverage/lcov-report/src/contexts/MapContext.tsx.html +23 -23
  85. package/coverage/lcov-report/src/contexts/SimpleDataContext.js.html +1 -1
  86. package/coverage/lcov-report/src/contexts/SimpleDataProvider.js.html +1 -1
  87. package/coverage/lcov-report/src/contexts/index.html +1 -1
  88. package/coverage/lcov-report/src/hooks/index.html +50 -50
  89. package/coverage/lcov-report/src/hooks/useCameraFollowPath/index.html +1 -1
  90. package/coverage/lcov-report/src/hooks/useCameraFollowPath/useCameraFollowPath.tsx.html +1 -1
  91. package/coverage/lcov-report/src/hooks/useExportMap/index.html +1 -1
  92. package/coverage/lcov-report/src/hooks/useExportMap/index.ts.html +1 -1
  93. package/coverage/lcov-report/src/hooks/useExportMap/lib.ts.html +1 -1
  94. package/coverage/lcov-report/src/hooks/useGpx/index.html +116 -0
  95. package/coverage/lcov-report/src/hooks/useGpx/useGpx.tsx.html +295 -0
  96. package/coverage/lcov-report/src/hooks/useLayer.ts.html +132 -66
  97. package/coverage/lcov-report/src/hooks/useLayerEvent.js.html +1 -1
  98. package/coverage/lcov-report/src/hooks/useLayerHoverPopup/index.html +116 -0
  99. package/coverage/lcov-report/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx.html +331 -0
  100. package/coverage/lcov-report/src/hooks/useMap.ts.html +47 -47
  101. package/coverage/lcov-report/src/hooks/useMapState.ts.html +54 -54
  102. package/coverage/lcov-report/src/hooks/useSource.ts.html +57 -57
  103. package/coverage/lcov-report/src/hooks/{useWms.js.html → useWms.ts.html} +54 -15
  104. package/coverage/lcov-report/src/index.html +1 -1
  105. package/coverage/lcov-report/src/index.ts.html +6 -6
  106. package/coverage/lcov.info +1284 -1959
  107. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +51 -25
  108. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +3 -2
  109. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +35 -16
  110. package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +1 -1
  111. package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +12 -9
  112. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +1 -1
  113. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +12 -9
  114. package/dist/components/MlGPXViewer/util/GeoJsonContext.d.ts +1 -1
  115. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +22 -11
  116. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +4 -95
  117. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +3 -0
  118. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +3 -0
  119. package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +30 -0
  120. package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +17 -0
  121. package/dist/components/MlGpxViewer/MlGpxViewer.test.d.ts +1 -0
  122. package/dist/components/MlGpxViewer/util/GeoJsonContext.d.ts +10 -0
  123. package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +4 -0
  124. package/dist/components/MlGpxViewer/util/MetadataDrawer.d.ts +7 -0
  125. package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +10 -0
  126. package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +3 -0
  127. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +11 -2
  128. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +7 -9
  129. package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +8 -2
  130. package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +13 -9
  131. package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +13 -3
  132. package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +12 -10
  133. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +33 -14
  134. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +18 -15
  135. package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +14 -0
  136. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +3 -67
  137. package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +7 -4
  138. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +17 -10
  139. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +23 -12
  140. package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +3 -0
  141. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +6 -0
  142. package/dist/decorators/ThemeWrapper.d.ts +3 -1
  143. package/dist/hooks/useGpx/lib/gpxConverter.d.ts +11 -0
  144. package/dist/hooks/useGpx/useGpx.d.ts +26 -0
  145. package/dist/hooks/useGpx/useGpx.stories.d.ts +10 -0
  146. package/dist/hooks/useLayer.d.ts +13 -7
  147. package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.d.ts +23 -0
  148. package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +10 -0
  149. package/dist/hooks/useMap.d.ts +1 -1
  150. package/dist/hooks/useMap.test.d.ts +1 -0
  151. package/dist/hooks/useSource.d.ts +2 -2
  152. package/dist/hooks/useWms.d.ts +24 -16
  153. package/dist/index.d.ts +5 -5
  154. package/dist/index.esm.js +9310 -14006
  155. package/dist/index.esm.js.map +1 -1
  156. package/dist/setupTests.d.ts +6 -5
  157. package/dist/ui_components/Dropzone.d.ts +5 -0
  158. package/dist/ui_components/ImageLoader.d.ts +8 -1
  159. package/dist/ui_components/LoadingOverlayContext.d.ts +11 -11
  160. package/dist/ui_components/Sidebar.d.ts +7 -6
  161. package/dist/ui_components/Tooltip.d.ts +1 -1
  162. package/dist/ui_components/TopToolbar.d.ts +4 -3
  163. package/dist/ui_components/UploadButton.d.ts +6 -0
  164. package/dist/util/BubbleForInstructions.d.ts +2 -0
  165. package/dist/util/Instructions.d.ts +13 -0
  166. package/package.json +195 -191
  167. package/{src/components/MlImageMarkerLayer → public}/assets/wg-marker.png +0 -0
  168. package/scripts/build-catalogue-meta.js +35 -11
  169. package/src/components/MapLibreMap/lib/MapLibreGlWrapper.ts +230 -188
  170. package/src/components/MlCenterPosition/MlCenterPosition.meta_.json +1 -2
  171. package/src/components/MlCenterPosition/MlCenterPosition.stories.tsx +20 -0
  172. package/src/components/MlCenterPosition/MlCenterPosition.tsx +4 -4
  173. package/src/components/MlComponentTemplate/MlComponentTemplate.meta_.json +1 -2
  174. package/src/components/MlComponentTemplate/{MlComponentTemplate.stories.js → MlComponentTemplate.stories.tsx} +2 -2
  175. package/src/components/MlComponentTemplate/MlComponentTemplate.tsx +1 -1
  176. package/src/components/MlCreatePdfButton/MlCreatePdfButton.meta_.json +1 -2
  177. package/src/components/MlCreatePdfButton/{MlCreatePdfButton.stories.js → MlCreatePdfButton.stories.tsx} +1 -1
  178. package/src/components/MlCreatePdfButton/MlCreatePdfButton.tsx +1 -1
  179. package/src/components/MlCreatePdfForm/MlCreatePdfForm.meta.json +1 -2
  180. package/src/components/MlCreatePdfForm/lib/PdfForm.tsx +25 -2
  181. package/src/components/MlFeatureEditor/MlFeatureEditor.meta.json +1 -2
  182. package/src/components/MlFeatureEditor/MlFeatureEditor.tsx +0 -1
  183. package/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.meta.json +1 -2
  184. package/src/components/MlFollowGps/MlFollowGps.meta.json +1 -2
  185. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.meta.json +1 -2
  186. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.tsx +89 -0
  187. package/src/components/MlGeoJsonLayer/MlGeoJsonLayer.tsx +24 -17
  188. package/src/components/MlGeoJsonLayer/assets/earthquake.json +109937 -0
  189. package/src/components/MlGeoJsonLayer/assets/wg_locations.json +65 -0
  190. package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.tsx +9 -0
  191. package/src/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.tsx +10 -0
  192. package/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.meta_.json +1 -2
  193. package/src/components/{MlGPXViewer/MlGPXViewer.doc.de.md → MlGpxViewer/MlGpxViewer.doc.de.md} +0 -0
  194. package/src/components/{MlGPXViewer/MlGPXViewer.doc.en.md → MlGpxViewer/MlGpxViewer.doc.en.md} +0 -0
  195. package/src/components/{MlGPXViewer/MlGPXViewer.meta.json → MlGpxViewer/MlGpxViewer.meta.json} +2 -3
  196. package/src/components/MlGpxViewer/MlGpxViewer.stories.tsx +109 -0
  197. package/src/components/MlGpxViewer/MlGpxViewer.test.js +53 -0
  198. package/src/components/MlGpxViewer/MlGpxViewer.tsx +103 -0
  199. package/src/components/{MlGPXViewer → MlGpxViewer}/util/GeoJsonContext.ts +0 -0
  200. package/src/components/{MlGPXViewer → MlGpxViewer}/util/GeoJsonProvider.tsx +0 -0
  201. package/src/components/MlGpxViewer/util/MetadataDrawer.tsx +38 -0
  202. package/src/components/MlGpxViewer/util/MlGpxDemoLoader.tsx +128 -0
  203. package/src/components/MlGpxViewer/util/MlGpxViewerInstructions.tsx +68 -0
  204. package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.meta_.json +1 -2
  205. package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.tsx +41 -0
  206. package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.test.js +27 -8
  207. package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.tsx +41 -115
  208. package/src/components/MlLayer/MlLayer.meta_.json +1 -2
  209. package/src/components/MlLayerMagnify/MlLayerMagnify.meta.json +1 -2
  210. package/src/components/MlLayerMagnify/MlLayerMagnify.stories.tsx +44 -0
  211. package/src/components/MlLayerMagnify/{MlLayerMagnify.test.js → MlLayerMagnify.test.tsx} +15 -18
  212. package/src/components/MlLayerMagnify/MlLayerMagnify.tsx +55 -61
  213. package/src/components/MlLayerSwipe/MlLayerSwipe.meta.json +1 -2
  214. package/src/components/MlLayerSwipe/{MlLayerSwipe.stories.js → MlLayerSwipe.stories.tsx} +9 -11
  215. package/src/components/MlLayerSwipe/MlLayerSwipe.tsx +47 -48
  216. package/src/components/MlLayerSwitcher/MlLayerSwitcher.meta_.json +1 -2
  217. package/src/components/MlLayerSwitcher/components/LayerBox.js +22 -19
  218. package/src/components/MlMarker/MlMarker.meta_.json +1 -2
  219. package/src/components/MlMeasureTool/MlMeasureTool.meta.json +1 -2
  220. package/src/components/MlNavigationCompass/MlNavigationCompass.meta.json +1 -2
  221. package/src/components/MlNavigationTools/MlNavigationTools.meta.json +1 -2
  222. package/src/components/MlScaleReference/MlScaleReference.meta.json +1 -2
  223. package/src/components/MlShareMapState/MlShareMapState.meta_.json +1 -2
  224. package/src/components/MlSketchTool/MlSketchTool.meta.json +1 -2
  225. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.meta.json +1 -2
  226. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.tsx +121 -0
  227. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.js +30 -1
  228. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.tsx +143 -0
  229. package/src/components/MlSpatialElevationProfile/util/getElevationData.tsx +103 -0
  230. package/src/components/MlThreeJsLayer/MlThreeJsLayer.meta.json +1 -2
  231. package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.meta.json +1 -2
  232. package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.js +2 -3
  233. package/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.tsx +17 -79
  234. package/src/components/MlUseMapDebugger/MlUseMapDebugger.meta_.json +1 -2
  235. package/src/components/MlVectorTileLayer/MlVectorTileLayer.meta.json +1 -2
  236. package/src/components/MlVectorTileLayer/MlVectorTileLayer.tsx +3 -2
  237. package/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.meta_.json +1 -2
  238. package/src/components/MlWmsLayer/MlWmsLayer.tsx +59 -41
  239. package/src/components/MlWmsLoader/MlWmsLoader.meta.json +1 -2
  240. package/src/components/MlWmsLoader/MlWmsLoader.stories.tsx +89 -0
  241. package/src/components/MlWmsLoader/MlWmsLoader.tsx +141 -122
  242. package/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.tsx +50 -0
  243. package/src/components/MlWmsLoader/utils/WMSLinks.tsx +128 -0
  244. package/src/decorators/MapContextDecorator.js +1 -1
  245. package/src/decorators/MapContextDecoratorHooks.js +1 -1
  246. package/src/decorators/ThemeWrapper.tsx +9 -0
  247. package/src/hooks/useCameraFollowPath/useCameraFollowPath.meta.json +1 -2
  248. package/src/{components/MlGPXViewer → hooks/useGpx/lib}/gpxConverter.js +1 -0
  249. package/src/hooks/useGpx/useGpx.doc.de.md +3 -0
  250. package/src/hooks/useGpx/useGpx.meta_.json +15 -0
  251. package/src/{components/MlCenterPosition/MlCenterPosition.stories.js → hooks/useGpx/useGpx.stories.js} +4 -5
  252. package/src/hooks/useGpx/useGpx.tsx +70 -0
  253. package/src/hooks/useLayer.ts +32 -10
  254. package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.doc.de.md +3 -0
  255. package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.meta_.json +15 -0
  256. package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.js +20 -0
  257. package/src/hooks/useLayerHoverPopup/useLayerHoverPopup.tsx +82 -0
  258. package/src/hooks/useMap.test.tsx +48 -0
  259. package/src/hooks/useMap.ts +8 -8
  260. package/src/hooks/useSource.ts +4 -4
  261. package/src/hooks/{useWms.js → useWms.ts} +24 -11
  262. package/src/index.ts +5 -5
  263. package/src/setupTests.js +18 -15
  264. package/src/ui_components/Dropzone.tsx +104 -0
  265. package/src/ui_components/{ImageLoader.js → ImageLoader.tsx} +30 -25
  266. package/src/ui_components/{LoadingOverlayContext.js → LoadingOverlayContext.tsx} +12 -15
  267. package/src/ui_components/Sidebar.tsx +12 -10
  268. package/src/ui_components/Tooltip.tsx +17 -0
  269. package/src/ui_components/TopToolbar.tsx +5 -3
  270. package/src/ui_components/UploadButton.tsx +57 -0
  271. package/src/util/BubbleForInstructions.js +46 -0
  272. package/src/util/Instructions.tsx +60 -0
  273. package/tsconfig.json +1 -1
  274. package/coverage/lcov-report/src/components/MlGPXViewer/MlGPXViewer.tsx.html +0 -1222
  275. package/coverage/lcov-report/src/components/MlGPXViewer/gpxConverter.js.html +0 -1645
  276. package/coverage/lcov-report/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js.html +0 -757
  277. package/dist/components/MlGPXViewer/util/MlGPXViewerInstructions.d.ts +0 -1
  278. package/dist/components/MlGPXViewer/util/SampleLayer.d.ts +0 -0
  279. package/dist/components/MlGPXViewer/util/demoViewer.d.ts +0 -5
  280. package/src/components/MlGPXViewer/MlGPXViewer.stories.js +0 -91
  281. package/src/components/MlGPXViewer/MlGPXViewer.test.js +0 -28
  282. package/src/components/MlGPXViewer/MlGPXViewer.tsx +0 -379
  283. package/src/components/MlGPXViewer/util/MlGPXViewerInstructions.js +0 -145
  284. package/src/components/MlGPXViewer/util/SampleLayer.js +0 -2
  285. package/src/components/MlGPXViewer/util/demoViewer.js +0 -254
  286. package/src/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.js +0 -45
  287. package/src/components/MlLayerMagnify/MlLayerMagnify.stories.js +0 -41
  288. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.js +0 -224
  289. package/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.js +0 -57
  290. package/src/components/MlWmsLoader/MlWmsLoader.stories.js +0 -47
  291. package/src/decorators/ThemeWrapper.jsx +0 -9
  292. package/src/ui_components/Legend.js +0 -44
  293. package/src/ui_components/LoadingOverlay.js +0 -41
  294. package/src/ui_components/Tooltip.js +0 -21
@@ -1,6 +1,11 @@
1
- import { IControl, MapOptions as MapOptionsType } from "!maplibre-gl";
2
- import { Map as MapType } from "maplibre-gl";
3
- type EventArgArray = [string, string | Function, Function?];
1
+ import { Map, IControl, MapOptions as MapOptionsType, MapEventType, MapLayerEventType, StyleImageInterface, LayerSpecification, CustomLayerInterface, SourceSpecification, ControlPosition } from '!maplibre-gl';
2
+ import { Map as MapType, Style } from 'maplibre-gl';
3
+ type WrapperEventArgArray = [string, (arg0: unknown) => void];
4
+ type EventArgArray = [
5
+ keyof MapLayerEventType | keyof MapEventType,
6
+ string | ((arg0: unknown) => void),
7
+ ((arg0: unknown) => void)?
8
+ ];
4
9
  type LayerState = {
5
10
  id: string;
6
11
  type: string;
@@ -29,47 +34,68 @@ declare class MapLibreGlWrapper {
29
34
  layers: [string?];
30
35
  sources: [string?];
31
36
  images: [string?];
32
- controls: [IControl?];
37
+ controls: [(IControl | unknown)?];
33
38
  events: [EventArgArray?];
34
- wrapperEvents: [EventArgArray?];
39
+ wrapperEvents: [WrapperEventArgArray?];
35
40
  };
36
41
  };
37
42
  baseLayers: [string?];
38
43
  firstSymbolLayer: string | undefined;
39
44
  eventHandlers: {
40
- layerchange: [Function?];
41
- viewportchange: [Function?];
45
+ layerchange: {
46
+ handler: (ev: unknown) => void;
47
+ options?: object | string;
48
+ }[];
49
+ viewportchange: {
50
+ handler: (ev: unknown) => void;
51
+ }[];
42
52
  };
43
53
  wrapper: {
44
- on: Function;
45
- off: Function;
46
- fire: Function;
47
- layerState: [LayerState?];
54
+ on: (eventName: string, handler: (ev: unknown) => void, options?: object | string, componentId?: string) => void;
55
+ off: (type: string, listener: (ev: unknown) => void) => void;
56
+ fire: (eventName: string, context?: unknown) => void;
57
+ layerState: LayerState[];
48
58
  layerStateString: string;
49
59
  oldLayerStateStrings: object;
50
- buildLayerObject: Function;
51
- buildLayerObjects: Function;
52
- refreshLayerState: Function;
60
+ buildLayerObject: (layer: ReturnType<Style['getLayer']>) => LayerState;
61
+ buildLayerObjects: () => LayerState[];
62
+ refreshLayerState: () => void;
53
63
  viewportState: ViewportState;
54
64
  viewportStateString: string;
55
65
  oldViewportStateString: string;
56
- getViewport: Function;
57
- refreshViewport: Function;
66
+ getViewport: () => {
67
+ center: {
68
+ lng: number;
69
+ lat: number;
70
+ };
71
+ zoom: number;
72
+ bearing: number;
73
+ pitch: number;
74
+ };
75
+ refreshViewport: () => void;
58
76
  };
59
- initRegisteredElements: Function;
60
- addNativeMaplibreFunctionsAndProps: Function;
77
+ initRegisteredElements: (componentId: string, force?: boolean | undefined) => void;
78
+ addNativeMaplibreFunctionsAndProps: () => void;
61
79
  map: MapType;
62
80
  style: object;
63
81
  styleJson: object;
64
- addLayer: Function;
65
- addSource: Function;
66
- addControl: Function;
67
- addImage: Function;
68
- on: Function;
69
- cleanup: Function;
82
+ addLayer: (layer: (LayerSpecification & {
83
+ source?: string | SourceSpecification | undefined;
84
+ }) | (CustomLayerInterface & {
85
+ source?: string | SourceSpecification | undefined;
86
+ }), beforeId?: string | undefined, componentId?: string | undefined) => Map | undefined;
87
+ addSource: (id: string, source: SourceSpecification, componentId?: string | undefined) => Map | undefined;
88
+ addControl: (control: IControl | unknown, position?: ControlPosition | undefined, componentId?: string | undefined) => Map | undefined;
89
+ addImage: (id: string, image: HTMLImageElement | ImageBitmap | ImageData | {
90
+ width: number;
91
+ height: number;
92
+ data: Uint8Array | Uint8ClampedArray;
93
+ } | StyleImageInterface, componentId?: string | undefined) => void;
94
+ on: (type: keyof MapLayerEventType | keyof MapEventType | string, layerId: string | ((ev: unknown) => void), handler?: ((ev: MapEventType & unknown) => Map | void) | string, componentId?: string | undefined) => Map | undefined;
95
+ cleanup: (componentId: string) => void;
70
96
  constructor(props: {
71
97
  mapOptions: MapOptionsType;
72
- onReady: Function;
98
+ onReady: (map: MapType, context: unknown) => void;
73
99
  });
74
100
  }
75
101
  export default MapLibreGlWrapper;
@@ -1,4 +1,5 @@
1
- interface MlCenterPositionProps {
1
+ import { SxProps, Theme } from "@mui/material";
2
+ export interface MlCenterPositionProps {
2
3
  /**
3
4
  * Id of the target MapLibre instance in mapContext
4
5
  */
@@ -19,7 +20,7 @@ interface MlCenterPositionProps {
19
20
  /**
20
21
  * CSS style object that is applied to the button component
21
22
  */
22
- style?: any;
23
+ style?: SxProps<Theme> | undefined;
23
24
  }
24
25
  /**
25
26
  * Component template
@@ -1,17 +1,36 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: {
4
+ (props: import("./MlCenterPosition").MlCenterPositionProps): JSX.Element;
5
+ defaultProps: {
6
+ mapId: undefined;
7
+ style: {
8
+ minWidth: string;
9
+ minHeight: string;
10
+ width: string;
11
+ height: string;
12
+ backgroundColor: string;
13
+ borderRadius: string;
14
+ margin: number;
15
+ fontSize: string;
16
+ ":hover": {
17
+ backgroundColor: string;
18
+ color: string;
19
+ };
20
+ };
21
+ onColor: string;
22
+ offColor: string;
23
+ };
24
+ };
25
+ argTypes: {};
26
+ decorators: ((Story: any) => JSX.Element)[];
27
+ parameters: {
28
+ docs: {
29
+ source: {
30
+ type: string;
31
+ };
32
+ };
33
+ };
34
+ };
1
35
  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";
36
+ export declare const ExampleConfig: any;
@@ -1,4 +1,4 @@
1
- interface MlComponentTemplateProps {
1
+ export interface MlComponentTemplateProps {
2
2
  /**
3
3
  * Id of the target MapLibre instance in mapContext
4
4
  */
@@ -1,10 +1,13 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: {
4
+ (props: import("./MlComponentTemplate").MlComponentTemplateProps): JSX.Element;
5
+ defaultProps: {
6
+ mapId: undefined;
7
+ };
8
+ };
9
+ argTypes: {};
10
+ decorators: ((Story: any) => JSX.Element)[];
11
+ };
1
12
  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";
13
+ export declare const ExampleConfig: any;
@@ -1,4 +1,4 @@
1
- interface MlCreatePdfButtonProps {
1
+ export interface MlCreatePdfButtonProps {
2
2
  /**
3
3
  * Id of the target MapLibre instance in mapContext
4
4
  */
@@ -1,10 +1,13 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: {
4
+ (props: import("./MlCreatePdfButton").MlCreatePdfButtonProps): JSX.Element;
5
+ defaultProps: {
6
+ mapId: undefined;
7
+ };
8
+ };
9
+ argTypes: {};
10
+ decorators: ((Story: any) => JSX.Element)[];
11
+ };
1
12
  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";
13
+ export declare const ExampleConfig: any;
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { FeatureCollection } from '@turf/turf';
3
- type ContextProps = {
3
+ declare type ContextProps = {
4
4
  data: FeatureCollection;
5
5
  setData: Function;
6
6
  getEmptyFeatureCollection: Function;
@@ -1,6 +1,7 @@
1
1
  import { Feature, FeatureCollection } from '@turf/turf';
2
- import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, MapLayerMouseEvent } from 'maplibre-gl';
3
- type MlGeoJsonLayerProps = {
2
+ import { useLayerProps } from '../../hooks/useLayer';
3
+ import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
4
+ export type MlGeoJsonLayerProps = {
4
5
  /**
5
6
  * Id of the target MapLibre instance in mapContext
6
7
  */
@@ -22,29 +23,39 @@ type MlGeoJsonLayerProps = {
22
23
  geojson: Feature | FeatureCollection | undefined;
23
24
  /**
24
25
  * Type of the layer that will be added to the MapLibre instance.
25
- * Possible values: "line", "circle", "fill"
26
+ * All types from LayerSpecification union type are supported except the type from
27
+ * RasterLayerSpecification
26
28
  */
27
- type?: 'fill' | 'line' | 'circle';
29
+ type?: Exclude<LayerSpecification['type'], RasterLayerSpecification['type']>;
28
30
  /**
29
31
  * Paint property object, that is passed to the addLayer call.
30
32
  * Possible props depend on the layer type.
33
+ * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
34
+ * Some examples are:
31
35
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
32
36
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
33
37
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
38
+ * All paint types from LayerSpecification union type are supported except the paint type from
39
+ * RasterLayerSpecification
34
40
  */
35
- paint?: CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
41
+ paint?: Exclude<LayerSpecification['paint'], RasterLayerSpecification['paint']>;
36
42
  /**
37
43
  * Layout property object, that is passed to the addLayer call.
38
44
  * Possible props depend on the layer type.
45
+ * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
46
+ * Some examples are:
39
47
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
40
48
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
41
49
  * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
50
+ * All layout types from LayerSpecification union type are supported except the layout type from
51
+ * RasterLayerSpecification
52
+
42
53
  */
43
- layout?: CircleLayerSpecification['layout'] | FillLayerSpecification['layout'] | LineLayerSpecification['layout'];
54
+ layout?: Exclude<LayerSpecification['layout'], RasterLayerSpecification['layout']>;
44
55
  /**
45
56
  * Javascript object that is spread into the addLayer commands first parameter.
46
57
  */
47
- options?: CircleLayerSpecification | FillLayerSpecification | LineLayerSpecification;
58
+ options?: Exclude<LayerSpecification, RasterLayerSpecification>;
48
59
  /**
49
60
  * Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
50
61
  */
@@ -56,19 +67,19 @@ type MlGeoJsonLayerProps = {
56
67
  /**
57
68
  * Hover event handler that is executed whenever a geometry rendered by this component is hovered.
58
69
  */
59
- onHover?: MapLayerMouseEvent;
70
+ onHover?: useLayerProps['onHover'];
60
71
  /**
61
72
  * Click event handler that is executed whenever a geometry rendered by this component is clicked.
62
73
  */
63
- onClick?: MapLayerMouseEvent;
74
+ onClick?: useLayerProps['onClick'];
64
75
  /**
65
76
  * Leave event handler that is executed whenever a geometry rendered by this component is
66
77
  * left/unhovered.
67
78
  */
68
- onLeave?: MapLayerMouseEvent;
79
+ onLeave?: useLayerProps['onLeave'];
69
80
  };
70
81
  /**
71
- * Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
82
+ * Adds source and layer to display GeoJSON data on the map.
72
83
  *
73
84
  * @component
74
85
  */
@@ -1,100 +1,7 @@
1
+ import { MlGeoJsonLayerProps } from './MlGeoJsonLayer';
1
2
  declare const storyoptions: {
2
3
  title: string;
3
- component: (props: {
4
- mapId?: string | undefined;
5
- insertBeforeLayer?: string | undefined;
6
- layerId?: string | undefined;
7
- geojson: import("@turf/turf").Feature<import("@turf/turf").Geometry | import("@turf/turf").GeometryCollection, import("@turf/turf").Properties> | import("@turf/turf").FeatureCollection<import("@turf/turf").Geometry | import("@turf/turf").GeometryCollection, import("@turf/turf").Properties> | undefined;
8
- type?: "circle" | "line" | "fill" | undefined;
9
- paint?: {
10
- "circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
11
- "circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
12
- "circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
13
- "circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
14
- "circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
15
- "circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
16
- "circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
17
- "circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
18
- "circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
19
- "circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
20
- "circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
21
- } | {
22
- "fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean> | undefined;
23
- "fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
24
- "fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
25
- "fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
26
- "fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
27
- "fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
28
- "fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
29
- } | {
30
- "line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
31
- "line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
32
- "line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
33
- "line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
34
- "line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
35
- "line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
36
- "line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
37
- "line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
38
- "line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<number[]> | undefined;
39
- "line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
40
- "line-gradient"?: import("maplibre-gl").ExpressionSpecification | undefined;
41
- } | undefined;
42
- layout?: {
43
- "circle-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
44
- visibility?: "none" | "visible" | undefined;
45
- } | {
46
- "fill-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
47
- visibility?: "none" | "visible" | undefined;
48
- } | {
49
- "line-cap"?: import("maplibre-gl").PropertyValueSpecification<"square" | "round" | "butt"> | undefined;
50
- "line-join"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<"round" | "bevel" | "miter"> | undefined;
51
- "line-miter-limit"?: import("maplibre-gl").PropertyValueSpecification<number> | undefined;
52
- "line-round-limit"?: import("maplibre-gl").PropertyValueSpecification<number> | undefined;
53
- "line-sort-key"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
54
- visibility?: "none" | "visible" | undefined;
55
- } | undefined;
56
- options?: import("maplibre-gl").CircleLayerSpecification | import("maplibre-gl").FillLayerSpecification | import("maplibre-gl").LineLayerSpecification | undefined;
57
- defaultPaintOverrides?: {
58
- circle?: {
59
- "circle-radius"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
60
- "circle-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
61
- "circle-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
62
- "circle-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
63
- "circle-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
64
- "circle-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
65
- "circle-pitch-scale"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
66
- "circle-pitch-alignment"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
67
- "circle-stroke-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
68
- "circle-stroke-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
69
- "circle-stroke-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
70
- } | undefined;
71
- fill?: {
72
- "fill-antialias"?: import("maplibre-gl").PropertyValueSpecification<boolean> | undefined;
73
- "fill-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
74
- "fill-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
75
- "fill-outline-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
76
- "fill-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
77
- "fill-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
78
- "fill-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
79
- } | undefined;
80
- line?: {
81
- "line-opacity"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
82
- "line-color"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
83
- "line-translate"?: import("maplibre-gl").PropertyValueSpecification<[number, number]> | undefined;
84
- "line-translate-anchor"?: import("maplibre-gl").PropertyValueSpecification<"map" | "viewport"> | undefined;
85
- "line-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
86
- "line-gap-width"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
87
- "line-offset"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
88
- "line-blur"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<number> | undefined;
89
- "line-dasharray"?: import("maplibre-gl").PropertyValueSpecification<number[]> | undefined;
90
- "line-pattern"?: import("maplibre-gl").DataDrivenPropertyValueSpecification<string> | undefined;
91
- "line-gradient"?: import("maplibre-gl").ExpressionSpecification | undefined;
92
- } | undefined;
93
- } | undefined;
94
- onHover?: import("maplibre-gl").MapLayerMouseEvent | undefined;
95
- onClick?: import("maplibre-gl").MapLayerMouseEvent | undefined;
96
- onLeave?: import("maplibre-gl").MapLayerMouseEvent | undefined;
97
- }) => JSX.Element;
4
+ component: (props: MlGeoJsonLayerProps) => JSX.Element;
98
5
  argTypes: {};
99
6
  decorators: ((Story: any) => JSX.Element)[];
100
7
  };
@@ -102,3 +9,5 @@ export default storyoptions;
102
9
  export declare const Linestring: any;
103
10
  export declare const Polygon: any;
104
11
  export declare const DefaultPaintOverrides: any;
12
+ export declare const HeatMapEarthquakes: any;
13
+ export declare const CircleMapWheregroupLocations: any;
@@ -0,0 +1,3 @@
1
+ import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
2
+ declare const CircleMapStyler: (props: MlGeoJsonLayerProps) => JSX.Element;
3
+ export default CircleMapStyler;
@@ -0,0 +1,3 @@
1
+ import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
2
+ declare const HeatMapStyler: (props: MlGeoJsonLayerProps) => JSX.Element;
3
+ export default HeatMapStyler;
@@ -0,0 +1,30 @@
1
+ import { FeatureCollection } from '@turf/turf';
2
+ import { MetadataType } from '../../hooks/useGpx/useGpx';
3
+ export interface MlGpxViewerProps {
4
+ /**
5
+ * Id of the target MapLibre instance in mapHook
6
+ */
7
+ mapId?: string;
8
+ /**
9
+ * The layerId of an existing layer this layer should be rendered visually beneath
10
+ * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
11
+ */
12
+ insertBeforeLayer?: string;
13
+ /**
14
+ * Prefix of the component id this component uses when adding elements to the MapLibreGl-instance
15
+ */
16
+ idPrefix?: string;
17
+ gpxData: string | undefined;
18
+ onParseGpxData: (arg0: {
19
+ geojson: FeatureCollection | undefined;
20
+ metadata: MetadataType[];
21
+ }) => void;
22
+ }
23
+ /**
24
+ * MlGpxViewer visualizes a given GPX Track on the map
25
+ */
26
+ declare const MlGpxViewer: {
27
+ (props: MlGpxViewerProps): JSX.Element;
28
+ defaultProps: {};
29
+ };
30
+ export default MlGpxViewer;
@@ -0,0 +1,17 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: {
4
+ (props: import("./MlGpxViewer").MlGpxViewerProps): JSX.Element;
5
+ defaultProps: {};
6
+ };
7
+ argTypes: {
8
+ options: {
9
+ control: {
10
+ type: string;
11
+ };
12
+ };
13
+ };
14
+ decorators: ((Story: any) => JSX.Element)[];
15
+ };
16
+ export default storyoptions;
17
+ export declare const ExampleConfig: any;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { FeatureCollection } from '@turf/turf';
3
+ type ContextProps = {
4
+ data: FeatureCollection;
5
+ setData: Function;
6
+ getEmptyFeatureCollection: Function;
7
+ };
8
+ declare const GeoJsonContext: React.Context<Partial<ContextProps>>;
9
+ export declare const GeoJsonContextProvider: React.Provider<Partial<ContextProps>>;
10
+ export default GeoJsonContext;
@@ -0,0 +1,4 @@
1
+ declare const GeoJsonProvider: ({ children }: {
2
+ children: JSX.Element;
3
+ }) => JSX.Element;
4
+ export default GeoJsonProvider;
@@ -0,0 +1,7 @@
1
+ import { MetadataType } from '../../../hooks/useGpx/useGpx';
2
+ type Props = {
3
+ metadata: MetadataType[];
4
+ open: boolean;
5
+ };
6
+ export default function MetadataDrawer(props: Props): JSX.Element;
7
+ export {};
@@ -0,0 +1,10 @@
1
+ interface MlGpxDemoLoaderProps {
2
+ open: boolean;
3
+ setOpen: (open: boolean) => void;
4
+ setGpx: (gpx: string | undefined) => void;
5
+ }
6
+ /**
7
+ * MlGpxDemoLoader returns a button to load a Demo GPX Track into the map.
8
+ */
9
+ declare const MlGpxDemoLoader: (props: MlGpxDemoLoaderProps) => JSX.Element;
10
+ export default MlGpxDemoLoader;
@@ -0,0 +1,3 @@
1
+ export default function MlGpxViewerInstructions(props: {
2
+ open: boolean;
3
+ }): JSX.Element;
@@ -1,4 +1,6 @@
1
- interface MlImageMarkerLayerProps {
1
+ import { SymbolLayerSpecification } from 'maplibre-gl';
2
+ import { Feature, FeatureCollection } from '@turf/turf';
3
+ export interface MlImageMarkerLayerProps {
2
4
  /**
3
5
  * Id of the target MapLibre instance in mapContext
4
6
  */
@@ -23,7 +25,14 @@ interface MlImageMarkerLayerProps {
23
25
  /**
24
26
  * Javascript object that is passed the addLayer command as first parameter.
25
27
  */
26
- options?: any;
28
+ options?: {
29
+ source?: {
30
+ type?: string | undefined;
31
+ data: Feature | FeatureCollection | undefined;
32
+ };
33
+ layout?: SymbolLayerSpecification['layout'];
34
+ paint?: SymbolLayerSpecification['paint'];
35
+ };
27
36
  }
28
37
  declare const MlImageMarkerLayer: (props: MlImageMarkerLayerProps) => JSX.Element;
29
38
  export default MlImageMarkerLayer;
@@ -1,10 +1,8 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: (props: import("./MlImageMarkerLayer").MlImageMarkerLayerProps) => JSX.Element;
4
+ argTypes: {};
5
+ decorators: ((Story: any) => JSX.Element)[];
6
+ };
1
7
  export default storyoptions;
2
- export const ExampleConfig: any;
3
- declare namespace storyoptions {
4
- export const title: string;
5
- export { MlImageMarkerLayer as component };
6
- export const argTypes: {};
7
- export { mapContextDecorator as decorators };
8
- }
9
- import MlImageMarkerLayer from "./MlImageMarkerLayer";
10
- import mapContextDecorator from "../../decorators/MapContextDecorator";
8
+ export declare const ExampleConfig: any;
@@ -1,5 +1,6 @@
1
- import "./style.css";
2
- interface MlLayerMagnifyProps {
1
+ import React from 'react';
2
+ import './style.css';
3
+ export interface MlLayerMagnifyProps {
3
4
  /**
4
5
  * Id of the first MapLibre instance
5
6
  */
@@ -12,6 +13,10 @@ interface MlLayerMagnifyProps {
12
13
  * Size of the "magnifier"-circle
13
14
  */
14
15
  magnifierRadius?: number;
16
+ /**
17
+ * object (React.CSSProperties) that is added to the magnifier default style
18
+ */
19
+ magnifierStyle: React.CSSProperties | undefined;
15
20
  }
16
21
  /**
17
22
  *
@@ -22,6 +27,7 @@ declare const MlLayerMagnify: {
22
27
  (props: MlLayerMagnifyProps): JSX.Element;
23
28
  defaultProps: {
24
29
  magnifierRadius: number;
30
+ magnifierStyle: {};
25
31
  };
26
32
  };
27
33
  export default MlLayerMagnify;
@@ -1,10 +1,14 @@
1
+ declare const storyoptions: {
2
+ title: string;
3
+ component: {
4
+ (props: import("./MlLayerMagnify").MlLayerMagnifyProps): JSX.Element;
5
+ defaultProps: {
6
+ magnifierRadius: number;
7
+ magnifierStyle: {};
8
+ };
9
+ };
10
+ argTypes: {};
11
+ decorators: ((Story: any) => JSX.Element)[];
12
+ };
1
13
  export default storyoptions;
2
- export const ExampleConfig: any;
3
- declare namespace storyoptions {
4
- export const title: string;
5
- export { MlLayerMagnify as component };
6
- export const argTypes: {};
7
- export { multiMapContextDecorator as decorators };
8
- }
9
- import MlLayerMagnify from "./MlLayerMagnify";
10
- import multiMapContextDecorator from "../../decorators/MultiMapContextDecorator";
14
+ export declare const ExampleConfig: any;