@mapcomponents/react-maplibre 0.1.95 → 1.0.0

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 (230) hide show
  1. package/.eslintrc.cjs +32 -0
  2. package/CHANGELOG.md +13 -0
  3. package/dist/{index.esm.css → assets/index.esm-Iqz0mZaU.css} +4 -4
  4. package/dist/components/MapLibreMap/MapLibreMap.d.ts +30 -31
  5. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +105 -105
  6. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +36 -36
  7. package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +18 -18
  8. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +22 -22
  9. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +30 -30
  10. package/dist/components/MlCreatePdfForm/lib/PdfContext.d.ts +8 -8
  11. package/dist/components/MlCreatePdfForm/lib/PdfForm.d.ts +11 -11
  12. package/dist/components/MlCreatePdfForm/lib/PdfPreview.d.ts +26 -26
  13. package/dist/components/MlCreatePdfForm/lib/pdf.templates.d.ts +11 -11
  14. package/dist/components/MlCreatePngButton/MlCreatePngButton.d.ts +22 -22
  15. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +5 -5
  16. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +62 -62
  17. package/dist/components/MlFollowGps/MlFollowGps.d.ts +81 -81
  18. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +97 -97
  19. package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +9 -2
  20. package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +8 -2
  21. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +4 -4
  22. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +4 -4
  23. package/dist/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +2 -2
  24. package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +5 -5
  25. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +23 -23
  26. package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +31 -31
  27. package/dist/components/MlGpxViewer/util/GeoJsonContext.d.ts +10 -10
  28. package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +5 -5
  29. package/dist/components/MlGpxViewer/util/Metadata.d.ts +7 -7
  30. package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +11 -11
  31. package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +4 -4
  32. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +39 -39
  33. package/dist/components/MlLayer/MlLayer.d.ts +33 -33
  34. package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +33 -33
  35. package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +26 -26
  36. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +29 -30
  37. package/dist/components/MlLayerSwitcher/components/LayerBox.d.ts +10 -6
  38. package/dist/components/MlMarker/MlMarker.d.ts +34 -34
  39. package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +36 -36
  40. package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +55 -55
  41. package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +33 -33
  42. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +55 -55
  43. package/dist/components/MlOrderLayers/MlOrderLayers.d.ts +21 -21
  44. package/dist/components/MlScaleReference/MlScaleReference.d.ts +9 -9
  45. package/dist/components/MlShareMapState/MlShareMapState.d.ts +42 -42
  46. package/dist/components/MlSketchTool/MlSketchTool.d.ts +42 -42
  47. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +40 -40
  48. package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +12 -14
  49. package/dist/components/MlTemporalController/MlTemporalController.d.ts +181 -181
  50. package/dist/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +20 -20
  51. package/dist/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +22 -22
  52. package/dist/components/MlTemporalController/utils/paintPicker.d.ts +59 -59
  53. package/dist/components/MlTemporalController/utils/useFilterData.d.ts +14 -14
  54. package/dist/components/MlTerrainLayer/MlTerrainLayer.d.ts +28 -28
  55. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +30 -30
  56. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +12 -10
  57. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +18 -22
  58. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +19 -19
  59. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +29 -22
  60. package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +104 -104
  61. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +125 -125
  62. package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +4 -4
  63. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +8 -8
  64. package/dist/contexts/LayerContext.d.ts +59 -59
  65. package/dist/contexts/MapContext.d.ts +24 -24
  66. package/dist/contexts/SimpleDataContext.d.ts +4 -4
  67. package/dist/contexts/SimpleDataProvider.d.ts +18 -8
  68. package/dist/decorators/EmptyMapDecorator.d.ts +4 -2
  69. package/dist/decorators/GeoJsonMapDecorator.d.ts +4 -2
  70. package/dist/decorators/LowZoomDecorator.d.ts +4 -2
  71. package/dist/decorators/MapContextDecorator.d.ts +4 -2
  72. package/dist/decorators/MapContextDecoratorHooks.d.ts +4 -2
  73. package/dist/decorators/MultiMapContextDecorator.d.ts +4 -2
  74. package/dist/decorators/NoNavToolsDecorator.d.ts +4 -2
  75. package/dist/decorators/ThemeDecorator.d.ts +5 -2
  76. package/dist/hooks/useAddImage/useAddImage.d.ts +20 -20
  77. package/dist/hooks/useAddProtocol/useAddProtocol.d.ts +23 -23
  78. package/dist/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +35 -35
  79. package/dist/hooks/useExportMap/index.d.ts +11 -11
  80. package/dist/hooks/useExportMap/lib.d.ts +51 -51
  81. package/dist/hooks/useFeatureEditor/useFeatureEditor.d.ts +46 -46
  82. package/dist/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +88 -88
  83. package/dist/hooks/useFitLayerBounds.d.ts +8 -8
  84. package/dist/hooks/useGpx/useGpx.d.ts +26 -26
  85. package/dist/hooks/useLayer.d.ts +36 -36
  86. package/dist/hooks/useLayerContext.d.ts +2 -2
  87. package/dist/hooks/useLayerFilter/useLayerFilter.d.ts +8 -8
  88. package/dist/hooks/useLayerHoverPopup/{useLayerHoverPopup.d.ts → LayerHoverPopup.d.ts} +23 -24
  89. package/dist/hooks/useMap.d.ts +14 -14
  90. package/dist/hooks/useMapState.d.ts +62 -62
  91. package/dist/hooks/useSource.d.ts +17 -17
  92. package/dist/hooks/useWms.d.ts +26 -26
  93. package/dist/index.d.ts +87 -89
  94. package/dist/index.esm.js +19777 -19977
  95. package/dist/index.esm.js.map +1 -1
  96. package/dist/omt_styles/bright.d.ts +2495 -2495
  97. package/dist/omt_styles/config.d.ts +7 -7
  98. package/dist/omt_styles/gruvbox.d.ts +2420 -2420
  99. package/dist/omt_styles/medieval_kingdom.d.ts +2420 -2420
  100. package/dist/omt_styles/monokai.d.ts +2420 -2420
  101. package/dist/omt_styles/oceanic_next.d.ts +2420 -2420
  102. package/dist/omt_styles/solarized.d.ts +2420 -2420
  103. package/dist/protocol_handlers/csv.d.ts +8 -8
  104. package/dist/protocol_handlers/mbtiles.d.ts +33 -33
  105. package/dist/protocol_handlers/osm.d.ts +11 -11
  106. package/dist/protocol_handlers/topojson.d.ts +9 -9
  107. package/dist/protocol_handlers/utils/getProtocolData.d.ts +1 -1
  108. package/dist/protocol_handlers/utils/protocolPathParser.d.ts +7 -7
  109. package/dist/protocol_handlers/xml.d.ts +10 -10
  110. package/dist/ui_components/AddLayerButton/AddLayerButton.d.ts +17 -17
  111. package/dist/ui_components/AddLayerButton/AddLayerPopup.d.ts +15 -15
  112. package/dist/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +8 -8
  113. package/dist/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +10 -10
  114. package/dist/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +13 -13
  115. package/dist/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +10 -10
  116. package/dist/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +10 -10
  117. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +6 -6
  118. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +7 -7
  119. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +6 -6
  120. package/dist/ui_components/ColorPicker/ColorPicker.d.ts +17 -17
  121. package/dist/ui_components/ColorPicker/transformers.d.ts +10 -10
  122. package/dist/ui_components/ConfirmDialog.d.ts +16 -16
  123. package/dist/ui_components/DemoDescriptions.d.ts +12 -12
  124. package/dist/ui_components/Dropzone.d.ts +6 -6
  125. package/dist/ui_components/ImageLoader.d.ts +10 -10
  126. package/dist/ui_components/LayerList/LayerList.d.ts +7 -7
  127. package/dist/ui_components/LayerList/LayerListFolder.d.ts +9 -9
  128. package/dist/ui_components/LayerList/LayerListItem.d.ts +26 -26
  129. package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +18 -18
  130. package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +23 -36
  131. package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +10 -10
  132. package/dist/ui_components/LayerList/util/SortableContainer.d.ts +7 -7
  133. package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +10 -10
  134. package/dist/ui_components/LoadingOverlayContext.d.ts +10 -10
  135. package/dist/ui_components/MapcomponentsTheme.d.ts +35 -35
  136. package/dist/ui_components/SelectStyleButton/SelectStyleButton.d.ts +20 -20
  137. package/dist/ui_components/SelectStyleButton/SelectStylePopup.d.ts +18 -18
  138. package/dist/ui_components/Sidebar.d.ts +12 -12
  139. package/dist/ui_components/SpeedDial/SpeedDial.d.ts +14 -14
  140. package/dist/ui_components/TopToolbar.d.ts +9 -9
  141. package/dist/ui_components/UploadButton.d.ts +8 -8
  142. package/dist/util/BubbleForInstructions.d.ts +16 -2
  143. package/dist/util/Instructions.d.ts +14 -14
  144. package/package.json +207 -208
  145. package/rollup.config.mjs +76 -0
  146. package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +0 -20
  147. package/dist/components/MapLibreMap/MapLibreMap.test.d.ts +0 -1
  148. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.test.d.ts +0 -1
  149. package/dist/components/MlBasicComponent.d.ts +0 -5
  150. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +0 -21
  151. package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +0 -14
  152. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +0 -14
  153. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.cy.d.ts +0 -1
  154. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.stories.d.ts +0 -15
  155. package/dist/components/MlCreatePdfForm/lib/_PdfPreview.d.ts +0 -14
  156. package/dist/components/MlCreatePngButton/MlCreatePngButton.stories.d.ts +0 -14
  157. package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +0 -16
  158. package/dist/components/MlFeatureEditor/MlFeatureEditor.test.d.ts +0 -1
  159. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +0 -27
  160. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.test.d.ts +0 -1
  161. package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +0 -11
  162. package/dist/components/MlFollowGps/MlFollowGps.test.d.ts +0 -1
  163. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +0 -18
  164. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.test.d.ts +0 -1
  165. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +0 -14
  166. package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +0 -18
  167. package/dist/components/MlGpxViewer/MlGpxViewer.test.d.ts +0 -1
  168. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +0 -9
  169. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.test.d.ts +0 -1
  170. package/dist/components/MlLayer/MlLayer.test.d.ts +0 -1
  171. package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +0 -15
  172. package/dist/components/MlLayerMagnify/MlLayerMagnify.test.d.ts +0 -1
  173. package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +0 -14
  174. package/dist/components/MlLayerSwipe/MlLayerSwipe.test.d.ts +0 -1
  175. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.stories.d.ts +0 -13
  176. package/dist/components/MlMarker/MlMarker.stories.d.ts +0 -9
  177. package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +0 -12
  178. package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.stories.d.ts +0 -16
  179. package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +0 -10
  180. package/dist/components/MlNavigationCompass/MlNavigationCompass.test.d.ts +0 -1
  181. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +0 -29
  182. package/dist/components/MlOrderLayers/MlOrderLayers.stories.d.ts +0 -15
  183. package/dist/components/MlOsmLayer/MlOsmLayer.d.ts +0 -18
  184. package/dist/components/MlOsmLayer/MlOsmLayer.stories_.d.ts +0 -16
  185. package/dist/components/MlOsmLayer/MlOsmLayer.test.d.ts +0 -1
  186. package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +0 -15
  187. package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +0 -17
  188. package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +0 -15
  189. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +0 -20
  190. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.d.ts +0 -1
  191. package/dist/components/MlTemporalController/MlTemporalController.stories.d.ts +0 -34
  192. package/dist/components/MlTerrainLayer/MlTerrainLayer.cy.d.ts +0 -1
  193. package/dist/components/MlTerrainLayer/MlTerrainLayer.stories.d.ts +0 -14
  194. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +0 -22
  195. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.test.d.ts +0 -1
  196. package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +0 -18
  197. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +0 -13
  198. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.test.d.ts +0 -1
  199. package/dist/components/MlTransitionGeoJsonLayer/util/transitionFunctions.d.ts +0 -2
  200. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.stories.d.ts +0 -13
  201. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.stories.d.ts +0 -13
  202. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.test.d.ts +0 -1
  203. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +0 -22
  204. package/dist/components/MlWmsLayer/MlWmsLayer.stories.d.ts +0 -13
  205. package/dist/components/MlWmsLayer/MlWmsLayer.test.d.ts +0 -1
  206. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +0 -30
  207. package/dist/contexts/MapComponentsProvider.test.d.ts +0 -1
  208. package/dist/contexts/SimpleDataProvider.test.d.ts +0 -1
  209. package/dist/hooks/useAddImage/useAddImage.stories.d.ts +0 -14
  210. package/dist/hooks/useAddImage/useaddImage.cy.d.ts +0 -1
  211. package/dist/hooks/useAddProtocol/useAddProtocol.stories.d.ts +0 -22
  212. package/dist/hooks/useCameraFollowPath/useCameraFollowPath.stories.d.ts +0 -18
  213. package/dist/hooks/useGpx/lib/gpxConverter.d.ts +0 -11
  214. package/dist/hooks/useGpx/useGpx.stories.d.ts +0 -10
  215. package/dist/hooks/useLayer.test.d.ts +0 -1
  216. package/dist/hooks/useLayerEvent.d.ts +0 -2
  217. package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +0 -10
  218. package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +0 -10
  219. package/dist/hooks/useMap.test.d.ts +0 -1
  220. package/dist/hooks/useMapState.stories.d.ts +0 -14
  221. package/dist/hooks/useSources.stories.d.ts +0 -13
  222. package/dist/setupTests.d.ts +0 -13
  223. package/dist/stories/components/Readme.d.ts +0 -2
  224. package/dist/ui_components/AddLayerButton/AddLayerButton.stories.d.ts +0 -13
  225. package/dist/ui_components/LayerList/LayerList.stories.d.ts +0 -15
  226. package/dist/ui_components/SelectStyleButton/SelectStyleButton.stories.d.ts +0 -15
  227. package/dist/ui_components/SpeedDial/SpeedDial.stories.d.ts +0 -21
  228. package/dist/util/index.d.ts +0 -3
  229. package/dist/util/layerRemovalTest.d.ts +0 -2
  230. package/dist/util/sourceRemovalTest.d.ts +0 -2
@@ -1,26 +1,26 @@
1
- import React from 'react';
2
- import { PdfPreviewOptions } from './pdfContext';
3
- import { Feature } from '@turf/turf';
4
- type Props = {
5
- /**
6
- * Id of the target MapLibre instance in mapContext
7
- */
8
- mapId?: string;
9
- /**
10
- * Polygon GeoJson Feature representing the printing area
11
- */
12
- geojsonRef: React.MutableRefObject<Feature | undefined>;
13
- /**
14
- * a state variable containing the PDF previews current state
15
- */
16
- options: PdfPreviewOptions;
17
- /**
18
- * setter function to update the current PDF preview state
19
- */
20
- setOptions: (arg1: (val: PdfPreviewOptions) => PdfPreviewOptions) => void;
21
- };
22
- /**
23
- * PdfPreview component renders a transformable (drag, scale, rotate) preview of the desired export or print content
24
- */
25
- export default function PdfPreview(props: Props): JSX.Element;
26
- export {};
1
+ import React from 'react';
2
+ import { PdfPreviewOptions } from './pdfContext';
3
+ import { Feature } from '@turf/turf';
4
+ type Props = {
5
+ /**
6
+ * Id of the target MapLibre instance in mapContext
7
+ */
8
+ mapId?: string;
9
+ /**
10
+ * Polygon GeoJson Feature representing the printing area
11
+ */
12
+ geojsonRef: React.MutableRefObject<Feature | undefined>;
13
+ /**
14
+ * a state variable containing the PDF previews current state
15
+ */
16
+ options: PdfPreviewOptions;
17
+ /**
18
+ * setter function to update the current PDF preview state
19
+ */
20
+ setOptions: (arg1: (val: PdfPreviewOptions) => PdfPreviewOptions) => void;
21
+ };
22
+ /**
23
+ * PdfPreview component renders a transformable (drag, scale, rotate) preview of the desired export or print content
24
+ */
25
+ export default function PdfPreview(props: Props): React.JSX.Element;
26
+ export {};
@@ -1,11 +1,11 @@
1
- interface PdfTemplateType {
2
- width: number;
3
- height: number;
4
- }
5
- interface PdfTemplateObject {
6
- [key: string]: ({
7
- [key: string]: PdfTemplateType;
8
- });
9
- }
10
- declare const PdfTemplates: PdfTemplateObject;
11
- export default PdfTemplates;
1
+ interface PdfTemplateType {
2
+ width: number;
3
+ height: number;
4
+ }
5
+ interface PdfTemplateObject {
6
+ [key: string]: ({
7
+ [key: string]: PdfTemplateType;
8
+ });
9
+ }
10
+ declare const PdfTemplates: PdfTemplateObject;
11
+ export default PdfTemplates;
@@ -1,22 +1,22 @@
1
- /// <reference types="react" />
2
- import { createExportOptions } from 'src/hooks/useExportMap/lib';
3
- export interface MlCreatePngButtonProps {
4
- /**
5
- * Id of the target MapLibre instance in mapContext
6
- */
7
- mapId?: string;
8
- /**
9
- * Option overrides for the createExport function
10
- */
11
- exportOptions?: createExportOptions;
12
- }
13
- /**
14
- * Renders a button that will create a Png file of the current map view (dimensions adjusted to fit DIN A4 paper).
15
- */
16
- declare const MlCreatePngButton: {
17
- (props: MlCreatePngButtonProps): JSX.Element;
18
- defaultProps: {
19
- mapId: undefined;
20
- };
21
- };
22
- export default MlCreatePngButton;
1
+ import React from 'react';
2
+ import { createExportOptions } from 'src/hooks/useExportMap/lib';
3
+ export interface MlCreatePngButtonProps {
4
+ /**
5
+ * Id of the target MapLibre instance in mapContext
6
+ */
7
+ mapId?: string;
8
+ /**
9
+ * Option overrides for the createExport function
10
+ */
11
+ exportOptions?: createExportOptions;
12
+ }
13
+ /**
14
+ * Renders a button that will create a Png file of the current map view (dimensions adjusted to fit DIN A4 paper).
15
+ */
16
+ declare const MlCreatePngButton: {
17
+ (props: MlCreatePngButtonProps): React.JSX.Element;
18
+ defaultProps: {
19
+ mapId: undefined;
20
+ };
21
+ };
22
+ export default MlCreatePngButton;
@@ -1,5 +1,5 @@
1
- import React from 'react';
2
- import { useFeatureEditorProps } from '../../hooks/useFeatureEditor/useFeatureEditor';
3
- import './MlFeatureEditor.css';
4
- declare const MlFeatureEditor: React.FC<useFeatureEditorProps>;
5
- export default MlFeatureEditor;
1
+ import React from 'react';
2
+ import { useFeatureEditorProps } from '../../hooks/useFeatureEditor/useFeatureEditor';
3
+ import './MlFeatureEditor.css';
4
+ declare const MlFeatureEditor: React.FC<useFeatureEditorProps>;
5
+ export default MlFeatureEditor;
@@ -1,62 +1,62 @@
1
- /// <reference types="react" />
2
- export interface MlFillExtrusionLayerProps {
3
- /**
4
- * Id of the target MapLibre instance in mapContext
5
- */
6
- mapId?: string;
7
- /**
8
- * The layerId of an existing layer this layer should be rendered visually beneath
9
- * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
10
- */
11
- insertBeforeLayer?: string;
12
- /**
13
- * Id of the layer that will be added by this component
14
- */
15
- layerId?: string;
16
- /**
17
- * Paint properties of the config object that is passed to the MapLibreGl.addLayer call. All
18
- * available properties are documented in the MapLibreGl documentation
19
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill-extrusion
20
- */
21
- paint?: object;
22
- /**
23
- * Source id of a vector tile source containing the geometries to use for this fill-extrusion
24
- * layer.
25
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#source-layer
26
- */
27
- sourceId?: string;
28
- /**
29
- * Layer id from a vector tile source containing the geometries to use for this fill-extrusion
30
- * layer.
31
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#source-layer
32
- */
33
- sourceLayer?: string;
34
- /**
35
- * This layer will be hidden for zoom levels lower than defined on this property
36
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#minzoom
37
- */
38
- minZoom?: number;
39
- }
40
- /**
41
- * Adds a fill extrusion layer to the MapLibre instance reference by props.mapId
42
- *
43
- */
44
- declare const MlFillExtrusionLayer: {
45
- (props: MlFillExtrusionLayerProps): JSX.Element;
46
- defaultProps: {
47
- mapId: undefined;
48
- paint: {
49
- "fill-extrusion-color": string;
50
- "fill-extrusion-height": {
51
- property: string;
52
- type: string;
53
- };
54
- "fill-extrusion-base": {
55
- property: string;
56
- type: string;
57
- };
58
- "fill-extrusion-opacity": number;
59
- };
60
- };
61
- };
62
- export default MlFillExtrusionLayer;
1
+ import React from "react";
2
+ export interface MlFillExtrusionLayerProps {
3
+ /**
4
+ * Id of the target MapLibre instance in mapContext
5
+ */
6
+ mapId?: string;
7
+ /**
8
+ * The layerId of an existing layer this layer should be rendered visually beneath
9
+ * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
10
+ */
11
+ insertBeforeLayer?: string;
12
+ /**
13
+ * Id of the layer that will be added by this component
14
+ */
15
+ layerId?: string;
16
+ /**
17
+ * Paint properties of the config object that is passed to the MapLibreGl.addLayer call. All
18
+ * available properties are documented in the MapLibreGl documentation
19
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill-extrusion
20
+ */
21
+ paint?: object;
22
+ /**
23
+ * Source id of a vector tile source containing the geometries to use for this fill-extrusion
24
+ * layer.
25
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#source-layer
26
+ */
27
+ sourceId?: string;
28
+ /**
29
+ * Layer id from a vector tile source containing the geometries to use for this fill-extrusion
30
+ * layer.
31
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#source-layer
32
+ */
33
+ sourceLayer?: string;
34
+ /**
35
+ * This layer will be hidden for zoom levels lower than defined on this property
36
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#minzoom
37
+ */
38
+ minZoom?: number;
39
+ }
40
+ /**
41
+ * Adds a fill extrusion layer to the MapLibre instance reference by props.mapId
42
+ *
43
+ */
44
+ declare const MlFillExtrusionLayer: {
45
+ (props: MlFillExtrusionLayerProps): React.JSX.Element;
46
+ defaultProps: {
47
+ mapId: undefined;
48
+ paint: {
49
+ "fill-extrusion-color": string;
50
+ "fill-extrusion-height": {
51
+ property: string;
52
+ type: string;
53
+ };
54
+ "fill-extrusion-base": {
55
+ property: string;
56
+ type: string;
57
+ };
58
+ "fill-extrusion-opacity": number;
59
+ };
60
+ };
61
+ };
62
+ export default MlFillExtrusionLayer;
@@ -1,81 +1,81 @@
1
- /// <reference types="react" />
2
- import { CircleLayerSpecification, FillLayerSpecification } from 'maplibre-gl';
3
- interface MlFollowGpsProps {
4
- /**
5
- * Id of the target MapLibre instance in mapContext
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
- * By default a dot will be shown on the map at the user's location. Set to false to disable.
15
- */
16
- showUserLocation?: boolean;
17
- /**
18
- * By default a cone will be shown on the map at the user's location to indicate the device's orientation.
19
- * Set to false to disable.
20
- */
21
- showOrientation?: boolean;
22
- /**
23
- * By default, if showUserLocation is true, a transparent circle will be drawn around the user location
24
- * indicating the accuracy (95% confidence level) of the user's location. Set to false to disable.
25
- */
26
- showAccuracyCircle?: boolean;
27
- /**
28
- * Use the MapLibre.flyTo function to center the map to the current users position if true.
29
- * Otherwise the MapLibre.setCenter function is used.
30
- */
31
- useFlyTo?: boolean;
32
- /**
33
- * Center map to current position once updated location data is recieved.
34
- * "false" will center the map once on component activation and then display the updated user location on the map.
35
- */
36
- centerUserPosition?: boolean;
37
- /**
38
- * Orientation cone paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the orientation cone polygon.
39
- * Use any available paint prop from layer type "fill".
40
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
41
- */
42
- orientationConePaint?: FillLayerSpecification['paint'];
43
- /**
44
- * Position circle paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the position circle.
45
- * Use any available paint prop from layer type "circle".
46
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
47
- */
48
- circlePaint?: CircleLayerSpecification['paint'];
49
- /**
50
- * Active button font color
51
- */
52
- onColor?: string;
53
- /**
54
- * Inactive button font color
55
- */
56
- offColor?: string;
57
- /**
58
- * Accuracy paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the accuracy polygon.
59
- * Use any available paint prop from layer type "fill".
60
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
61
- */
62
- accuracyPaint?: FillLayerSpecification['paint'];
63
- }
64
- /**
65
- * Adds a button that makes the map follow the users GPS position using
66
- * navigator.geolocation.watchPosition if activated
67
- *
68
- */
69
- declare const MlFollowGps: {
70
- (props: MlFollowGpsProps): JSX.Element;
71
- defaultProps: {
72
- mapId: undefined;
73
- offColor: string;
74
- showAccuracyCircle: boolean;
75
- showUserLocation: boolean;
76
- showOrientation: boolean;
77
- centerUserPosition: boolean;
78
- useFlyTo: boolean;
79
- };
80
- };
81
- export default MlFollowGps;
1
+ import React from 'react';
2
+ import { CircleLayerSpecification, FillLayerSpecification } from 'maplibre-gl';
3
+ export interface MlFollowGpsProps {
4
+ /**
5
+ * Id of the target MapLibre instance in mapContext
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
+ * By default a dot will be shown on the map at the user's location. Set to false to disable.
15
+ */
16
+ showUserLocation?: boolean;
17
+ /**
18
+ * By default a cone will be shown on the map at the user's location to indicate the device's orientation.
19
+ * Set to false to disable.
20
+ */
21
+ showOrientation?: boolean;
22
+ /**
23
+ * By default, if showUserLocation is true, a transparent circle will be drawn around the user location
24
+ * indicating the accuracy (95% confidence level) of the user's location. Set to false to disable.
25
+ */
26
+ showAccuracyCircle?: boolean;
27
+ /**
28
+ * Use the MapLibre.flyTo function to center the map to the current users position if true.
29
+ * Otherwise the MapLibre.setCenter function is used.
30
+ */
31
+ useFlyTo?: boolean;
32
+ /**
33
+ * Center map to current position once updated location data is recieved.
34
+ * "false" will center the map once on component activation and then display the updated user location on the map.
35
+ */
36
+ centerUserPosition?: boolean;
37
+ /**
38
+ * Orientation cone paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the orientation cone polygon.
39
+ * Use any available paint prop from layer type "fill".
40
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
41
+ */
42
+ orientationConePaint?: FillLayerSpecification['paint'];
43
+ /**
44
+ * Position circle paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the position circle.
45
+ * Use any available paint prop from layer type "circle".
46
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
47
+ */
48
+ circlePaint?: CircleLayerSpecification['paint'];
49
+ /**
50
+ * Active button font color
51
+ */
52
+ onColor?: string;
53
+ /**
54
+ * Inactive button font color
55
+ */
56
+ offColor?: string;
57
+ /**
58
+ * Accuracy paint property object, that is passed to the MlGeoJsonLayer responsible for drawing the accuracy polygon.
59
+ * Use any available paint prop from layer type "fill".
60
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
61
+ */
62
+ accuracyPaint?: FillLayerSpecification['paint'];
63
+ }
64
+ /**
65
+ * Adds a button that makes the map follow the users GPS position using
66
+ * navigator.geolocation.watchPosition if activated
67
+ *
68
+ */
69
+ declare const MlFollowGps: {
70
+ (props: MlFollowGpsProps): React.JSX.Element;
71
+ defaultProps: {
72
+ mapId: undefined;
73
+ offColor: string;
74
+ showAccuracyCircle: boolean;
75
+ showUserLocation: boolean;
76
+ showOrientation: boolean;
77
+ centerUserPosition: boolean;
78
+ useFlyTo: boolean;
79
+ };
80
+ };
81
+ export default MlFollowGps;
@@ -1,98 +1,98 @@
1
- /// <reference types="react" />
2
- import { Feature, FeatureCollection } from '@turf/turf';
3
- import { useLayerProps } from '../../hooks/useLayer';
4
- import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
5
- export type MlGeoJsonLayerProps = {
6
- /**
7
- * Id of the target MapLibre instance in mapContext
8
- */
9
- mapId?: string;
10
- /**
11
- * Id of an existing layer in the mapLibre instance to help specify the layer order
12
- * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
13
- * This layer will not be added to the maplibre-gl instance until a layer with an
14
- * id that matches the value of insertBeforeLayer is created.
15
- */
16
- insertBeforeLayer?: string;
17
- /**
18
- * Id of the new layer and source that are added to the MapLibre instance
19
- */
20
- layerId?: string;
21
- /**
22
- * GeoJSON data that is supposed to be rendered by this component.
23
- */
24
- geojson?: Feature | FeatureCollection | undefined;
25
- /**
26
- * Type of the layer that will be added to the MapLibre instance.
27
- * All types from LayerSpecification union type are supported except the type from
28
- * RasterLayerSpecification
29
- */
30
- type?: Exclude<LayerSpecification['type'], RasterLayerSpecification['type']>;
31
- /**
32
- * @deprecated The property should not be used. Please use the options.paint property instead. This will be removed in the next major release.
33
- * Paint property object, that is passed to the addLayer call.
34
- * Possible props depend on the layer type.
35
- * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
36
- * Some examples are:
37
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
38
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
39
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
40
- * All paint types from LayerSpecification union type are supported except the paint type from
41
- * RasterLayerSpecification
42
- */
43
- paint?: Exclude<LayerSpecification['paint'], RasterLayerSpecification['paint']>;
44
- /**
45
- * @deprecated The property should not be used. Please use the options.layout property instead. This will be removed in the next major release.
46
- * Layout property object, that is passed to the addLayer call.
47
- * Possible props depend on the layer type.
48
- * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
49
- * Some examples are:
50
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
51
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
52
- * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
53
- * All layout types from LayerSpecification union type are supported except the layout type from
54
- * RasterLayerSpecification
1
+ import React from 'react';
2
+ import { Feature, FeatureCollection } from '@turf/turf';
3
+ import { useLayerProps } from '../../hooks/useLayer';
4
+ import { LineLayerSpecification, CircleLayerSpecification, FillLayerSpecification, LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
5
+ export type MlGeoJsonLayerProps = {
6
+ /**
7
+ * Id of the target MapLibre instance in mapContext
8
+ */
9
+ mapId?: string;
10
+ /**
11
+ * Id of an existing layer in the mapLibre instance to help specify the layer order
12
+ * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
13
+ * This layer will not be added to the maplibre-gl instance until a layer with an
14
+ * id that matches the value of insertBeforeLayer is created.
15
+ */
16
+ insertBeforeLayer?: string;
17
+ /**
18
+ * Id of the new layer and source that are added to the MapLibre instance
19
+ */
20
+ layerId?: string;
21
+ /**
22
+ * GeoJSON data that is supposed to be rendered by this component.
23
+ */
24
+ geojson?: GeoJSON.Feature | GeoJSON.FeatureCollection | Feature | FeatureCollection | undefined;
25
+ /**
26
+ * Type of the layer that will be added to the MapLibre instance.
27
+ * All types from LayerSpecification union type are supported except the type from
28
+ * RasterLayerSpecification
29
+ */
30
+ type?: Exclude<LayerSpecification['type'], RasterLayerSpecification['type']>;
31
+ /**
32
+ * @deprecated The property should not be used. Please use the options.paint property instead. This will be removed in the next major release.
33
+ * Paint property object, that is passed to the addLayer call.
34
+ * Possible props depend on the layer type.
35
+ * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
36
+ * Some examples are:
37
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
38
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
39
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
40
+ * All paint types from LayerSpecification union type are supported except the paint type from
41
+ * RasterLayerSpecification
42
+ */
43
+ paint?: Exclude<LayerSpecification['paint'], RasterLayerSpecification['paint']>;
44
+ /**
45
+ * @deprecated The property should not be used. Please use the options.layout property instead. This will be removed in the next major release.
46
+ * Layout property object, that is passed to the addLayer call.
47
+ * Possible props depend on the layer type.
48
+ * See https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/
49
+ * Some examples are:
50
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#line
51
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#circle
52
+ * https://maplibre.org/maplibre-gl-js-docs/style-spec/layers/#fill
53
+ * All layout types from LayerSpecification union type are supported except the layout type from
54
+ * RasterLayerSpecification
55
55
 
56
- */
57
- layout?: LayerSpecification['layout'];
58
- /**
59
- * Javascript object that is spread into the addLayer commands first parameter.
60
- */
61
- options?: useLayerProps['options'];
62
- /**
63
- * Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
64
- */
65
- defaultPaintOverrides?: {
66
- circle?: CircleLayerSpecification['paint'];
67
- fill?: FillLayerSpecification['paint'];
68
- line?: LineLayerSpecification['paint'];
69
- };
70
- /**
71
- * Property name in the GeoJSON object to be used as a label.
72
- */
73
- labelProp?: string;
74
- /**
75
- * Label configuration options.
76
- */
77
- labelOptions?: useLayerProps['options'];
78
- /**
79
- * Hover event handler that is executed whenever a geometry rendered by this component is hovered.
80
- */
81
- onHover?: useLayerProps['onHover'];
82
- /**
83
- * Click event handler that is executed whenever a geometry rendered by this component is clicked.
84
- */
85
- onClick?: useLayerProps['onClick'];
86
- /**
87
- * Leave event handler that is executed whenever a geometry rendered by this component is
88
- * left/unhovered.
89
- */
90
- onLeave?: useLayerProps['onLeave'];
91
- };
92
- /**
93
- * Adds source and layer to display GeoJSON data on the map.
94
- *
95
- * @component
96
- */
97
- declare const MlGeoJsonLayer: (props: MlGeoJsonLayerProps) => JSX.Element;
98
- export default MlGeoJsonLayer;
56
+ */
57
+ layout?: LayerSpecification['layout'];
58
+ /**
59
+ * Javascript object that is spread into the addLayer commands first parameter.
60
+ */
61
+ options?: useLayerProps['options'];
62
+ /**
63
+ * Javascript object with optional properties "fill", "line", "circle" to override implicit layer type default paint properties.
64
+ */
65
+ defaultPaintOverrides?: {
66
+ circle?: CircleLayerSpecification['paint'];
67
+ fill?: FillLayerSpecification['paint'];
68
+ line?: LineLayerSpecification['paint'];
69
+ };
70
+ /**
71
+ * Property name in the GeoJSON object to be used as a label.
72
+ */
73
+ labelProp?: string;
74
+ /**
75
+ * Label configuration options.
76
+ */
77
+ labelOptions?: useLayerProps['options'];
78
+ /**
79
+ * Hover event handler that is executed whenever a geometry rendered by this component is hovered.
80
+ */
81
+ onHover?: useLayerProps['onHover'];
82
+ /**
83
+ * Click event handler that is executed whenever a geometry rendered by this component is clicked.
84
+ */
85
+ onClick?: useLayerProps['onClick'];
86
+ /**
87
+ * Leave event handler that is executed whenever a geometry rendered by this component is
88
+ * left/unhovered.
89
+ */
90
+ onLeave?: useLayerProps['onLeave'];
91
+ };
92
+ /**
93
+ * Adds source and layer to display GeoJSON data on the map.
94
+ *
95
+ * @component
96
+ */
97
+ declare const MlGeoJsonLayer: (props: MlGeoJsonLayerProps) => React.JSX.Element;
98
+ export default MlGeoJsonLayer;
@@ -1,2 +1,9 @@
1
- export default LineStyler;
2
- declare function LineStyler(props: any): JSX.Element;
1
+ import React from 'react';
2
+ import { GeoJSON } from 'geojson';
3
+ interface LineStylerProps {
4
+ geojson: GeoJSON;
5
+ openSidebar: boolean;
6
+ setOpenSidebar: (open: boolean) => void;
7
+ }
8
+ declare const LineStyler: React.FC<LineStylerProps>;
9
+ export default LineStyler;
@@ -1,2 +1,8 @@
1
- export default PolygonStyler;
2
- declare function PolygonStyler(props: any): JSX.Element;
1
+ import React from 'react';
2
+ interface PolygonStylerProps {
3
+ geojson: GeoJSON.FeatureCollection;
4
+ openSidebar: boolean;
5
+ setOpenSidebar: (open: boolean) => void;
6
+ }
7
+ declare const PolygonStyler: React.FC<PolygonStylerProps>;
8
+ export default PolygonStyler;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
3
- declare const CircleMapStyler: (props: MlGeoJsonLayerProps) => JSX.Element;
4
- export default CircleMapStyler;
1
+ import React from 'react';
2
+ import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer';
3
+ declare const CircleMapStyler: (props: MlGeoJsonLayerProps) => React.JSX.Element;
4
+ export default CircleMapStyler;