@mapcomponents/react-maplibre 0.1.96 → 1.0.1

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 (233) hide show
  1. package/.eslintrc.cjs +32 -0
  2. package/CHANGELOG.md +6 -0
  3. package/dist/{index.esm.css → assets/index.cjs-Iqz0mZaU.css} +4 -4
  4. package/dist/assets/index.esm-Iqz0mZaU.css +98 -0
  5. package/dist/components/MapLibreMap/MapLibreMap.d.ts +30 -31
  6. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +105 -105
  7. package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +36 -36
  8. package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +18 -18
  9. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +22 -22
  10. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +30 -30
  11. package/dist/components/MlCreatePdfForm/lib/PdfContext.d.ts +8 -8
  12. package/dist/components/MlCreatePdfForm/lib/PdfForm.d.ts +11 -11
  13. package/dist/components/MlCreatePdfForm/lib/PdfPreview.d.ts +26 -26
  14. package/dist/components/MlCreatePdfForm/lib/pdf.templates.d.ts +11 -11
  15. package/dist/components/MlCreatePngButton/MlCreatePngButton.d.ts +22 -22
  16. package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +5 -5
  17. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +62 -62
  18. package/dist/components/MlFollowGps/MlFollowGps.d.ts +81 -81
  19. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +97 -97
  20. package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +9 -2
  21. package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +8 -2
  22. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +4 -4
  23. package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +4 -4
  24. package/dist/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +2 -2
  25. package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +5 -5
  26. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +23 -23
  27. package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +31 -31
  28. package/dist/components/MlGpxViewer/util/GeoJsonContext.d.ts +10 -10
  29. package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +5 -5
  30. package/dist/components/MlGpxViewer/util/Metadata.d.ts +7 -7
  31. package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +11 -11
  32. package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +4 -4
  33. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +39 -39
  34. package/dist/components/MlLayer/MlLayer.d.ts +33 -33
  35. package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +33 -33
  36. package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +26 -26
  37. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +29 -30
  38. package/dist/components/MlLayerSwitcher/components/LayerBox.d.ts +10 -6
  39. package/dist/components/MlMarker/MlMarker.d.ts +34 -34
  40. package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +36 -36
  41. package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +55 -55
  42. package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +33 -33
  43. package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +55 -55
  44. package/dist/components/MlOrderLayers/MlOrderLayers.d.ts +21 -21
  45. package/dist/components/MlScaleReference/MlScaleReference.d.ts +9 -9
  46. package/dist/components/MlShareMapState/MlShareMapState.d.ts +42 -42
  47. package/dist/components/MlSketchTool/MlSketchTool.d.ts +42 -42
  48. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +40 -40
  49. package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +12 -14
  50. package/dist/components/MlTemporalController/MlTemporalController.d.ts +181 -181
  51. package/dist/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +20 -20
  52. package/dist/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +22 -22
  53. package/dist/components/MlTemporalController/utils/paintPicker.d.ts +59 -59
  54. package/dist/components/MlTemporalController/utils/useFilterData.d.ts +14 -14
  55. package/dist/components/MlTerrainLayer/MlTerrainLayer.d.ts +28 -28
  56. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +30 -30
  57. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +12 -10
  58. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +18 -22
  59. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +19 -19
  60. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +29 -22
  61. package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +104 -104
  62. package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +125 -125
  63. package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +4 -4
  64. package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +8 -8
  65. package/dist/contexts/LayerContext.d.ts +59 -59
  66. package/dist/contexts/MapContext.d.ts +24 -24
  67. package/dist/contexts/SimpleDataContext.d.ts +4 -4
  68. package/dist/contexts/SimpleDataProvider.d.ts +18 -8
  69. package/dist/decorators/EmptyMapDecorator.d.ts +4 -2
  70. package/dist/decorators/GeoJsonMapDecorator.d.ts +4 -2
  71. package/dist/decorators/LowZoomDecorator.d.ts +4 -2
  72. package/dist/decorators/MapContextDecorator.d.ts +4 -2
  73. package/dist/decorators/MapContextDecoratorHooks.d.ts +4 -2
  74. package/dist/decorators/MultiMapContextDecorator.d.ts +4 -2
  75. package/dist/decorators/NoNavToolsDecorator.d.ts +4 -2
  76. package/dist/decorators/ThemeDecorator.d.ts +5 -2
  77. package/dist/hooks/useAddImage/useAddImage.d.ts +20 -20
  78. package/dist/hooks/useAddProtocol/useAddProtocol.d.ts +23 -23
  79. package/dist/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +35 -35
  80. package/dist/hooks/useExportMap/index.d.ts +11 -11
  81. package/dist/hooks/useExportMap/lib.d.ts +51 -51
  82. package/dist/hooks/useFeatureEditor/useFeatureEditor.d.ts +46 -46
  83. package/dist/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +88 -88
  84. package/dist/hooks/useFitLayerBounds.d.ts +8 -8
  85. package/dist/hooks/useGpx/useGpx.d.ts +26 -26
  86. package/dist/hooks/useLayer.d.ts +36 -36
  87. package/dist/hooks/useLayerContext.d.ts +2 -2
  88. package/dist/hooks/useLayerFilter/useLayerFilter.d.ts +8 -8
  89. package/dist/hooks/useLayerHoverPopup/{useLayerHoverPopup.d.ts → LayerHoverPopup.d.ts} +23 -24
  90. package/dist/hooks/useMap.d.ts +14 -14
  91. package/dist/hooks/useMapState.d.ts +62 -62
  92. package/dist/hooks/useSource.d.ts +17 -17
  93. package/dist/hooks/useWms.d.ts +26 -26
  94. package/dist/index.cjs.js +21050 -0
  95. package/dist/index.cjs.js.map +1 -0
  96. package/dist/index.d.ts +87 -89
  97. package/dist/index.esm.js +19882 -20200
  98. package/dist/index.esm.js.map +1 -1
  99. package/dist/omt_styles/bright.d.ts +2495 -2495
  100. package/dist/omt_styles/config.d.ts +7 -7
  101. package/dist/omt_styles/gruvbox.d.ts +2420 -2420
  102. package/dist/omt_styles/medieval_kingdom.d.ts +2420 -2420
  103. package/dist/omt_styles/monokai.d.ts +2420 -2420
  104. package/dist/omt_styles/oceanic_next.d.ts +2420 -2420
  105. package/dist/omt_styles/solarized.d.ts +2420 -2420
  106. package/dist/protocol_handlers/csv.d.ts +8 -8
  107. package/dist/protocol_handlers/mbtiles.d.ts +33 -33
  108. package/dist/protocol_handlers/osm.d.ts +11 -11
  109. package/dist/protocol_handlers/topojson.d.ts +9 -9
  110. package/dist/protocol_handlers/utils/getProtocolData.d.ts +1 -1
  111. package/dist/protocol_handlers/utils/protocolPathParser.d.ts +7 -7
  112. package/dist/protocol_handlers/xml.d.ts +10 -10
  113. package/dist/ui_components/AddLayerButton/AddLayerButton.d.ts +17 -17
  114. package/dist/ui_components/AddLayerButton/AddLayerPopup.d.ts +15 -15
  115. package/dist/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +8 -8
  116. package/dist/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +10 -10
  117. package/dist/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +13 -13
  118. package/dist/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +10 -10
  119. package/dist/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +10 -10
  120. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +6 -6
  121. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +7 -7
  122. package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +6 -6
  123. package/dist/ui_components/ColorPicker/ColorPicker.d.ts +17 -17
  124. package/dist/ui_components/ColorPicker/transformers.d.ts +10 -10
  125. package/dist/ui_components/ConfirmDialog.d.ts +16 -16
  126. package/dist/ui_components/DemoDescriptions.d.ts +12 -12
  127. package/dist/ui_components/Dropzone.d.ts +6 -6
  128. package/dist/ui_components/ImageLoader.d.ts +10 -10
  129. package/dist/ui_components/LayerList/LayerList.d.ts +7 -7
  130. package/dist/ui_components/LayerList/LayerListFolder.d.ts +9 -9
  131. package/dist/ui_components/LayerList/LayerListItem.d.ts +26 -26
  132. package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +18 -18
  133. package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +23 -36
  134. package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +10 -10
  135. package/dist/ui_components/LayerList/util/SortableContainer.d.ts +7 -7
  136. package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +10 -10
  137. package/dist/ui_components/LoadingOverlayContext.d.ts +10 -10
  138. package/dist/ui_components/MapcomponentsTheme.d.ts +35 -35
  139. package/dist/ui_components/SelectStyleButton/SelectStyleButton.d.ts +20 -20
  140. package/dist/ui_components/SelectStyleButton/SelectStylePopup.d.ts +18 -18
  141. package/dist/ui_components/Sidebar.d.ts +12 -12
  142. package/dist/ui_components/SpeedDial/SpeedDial.d.ts +14 -14
  143. package/dist/ui_components/TopToolbar.d.ts +9 -9
  144. package/dist/ui_components/UploadButton.d.ts +8 -8
  145. package/dist/util/BubbleForInstructions.d.ts +16 -2
  146. package/dist/util/Instructions.d.ts +14 -14
  147. package/package.json +207 -208
  148. package/rollup.config.mjs +62 -0
  149. package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +0 -20
  150. package/dist/components/MapLibreMap/MapLibreMap.test.d.ts +0 -1
  151. package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.test.d.ts +0 -1
  152. package/dist/components/MlBasicComponent.d.ts +0 -5
  153. package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +0 -21
  154. package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +0 -14
  155. package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +0 -14
  156. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.cy.d.ts +0 -1
  157. package/dist/components/MlCreatePdfForm/MlCreatePdfForm.stories.d.ts +0 -15
  158. package/dist/components/MlCreatePdfForm/lib/_PdfPreview.d.ts +0 -14
  159. package/dist/components/MlCreatePngButton/MlCreatePngButton.stories.d.ts +0 -14
  160. package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +0 -16
  161. package/dist/components/MlFeatureEditor/MlFeatureEditor.test.d.ts +0 -1
  162. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +0 -27
  163. package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.test.d.ts +0 -1
  164. package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +0 -11
  165. package/dist/components/MlFollowGps/MlFollowGps.test.d.ts +0 -1
  166. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +0 -18
  167. package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.test.d.ts +0 -1
  168. package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +0 -14
  169. package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +0 -18
  170. package/dist/components/MlGpxViewer/MlGpxViewer.test.d.ts +0 -1
  171. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +0 -9
  172. package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.test.d.ts +0 -1
  173. package/dist/components/MlLayer/MlLayer.test.d.ts +0 -1
  174. package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +0 -15
  175. package/dist/components/MlLayerMagnify/MlLayerMagnify.test.d.ts +0 -1
  176. package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +0 -14
  177. package/dist/components/MlLayerSwipe/MlLayerSwipe.test.d.ts +0 -1
  178. package/dist/components/MlLayerSwitcher/MlLayerSwitcher.stories.d.ts +0 -13
  179. package/dist/components/MlMarker/MlMarker.stories.d.ts +0 -9
  180. package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +0 -12
  181. package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.stories.d.ts +0 -16
  182. package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +0 -10
  183. package/dist/components/MlNavigationCompass/MlNavigationCompass.test.d.ts +0 -1
  184. package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +0 -29
  185. package/dist/components/MlOrderLayers/MlOrderLayers.stories.d.ts +0 -15
  186. package/dist/components/MlOsmLayer/MlOsmLayer.d.ts +0 -18
  187. package/dist/components/MlOsmLayer/MlOsmLayer.stories_.d.ts +0 -16
  188. package/dist/components/MlOsmLayer/MlOsmLayer.test.d.ts +0 -1
  189. package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +0 -15
  190. package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +0 -17
  191. package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +0 -15
  192. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +0 -20
  193. package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.d.ts +0 -1
  194. package/dist/components/MlTemporalController/MlTemporalController.stories.d.ts +0 -34
  195. package/dist/components/MlTerrainLayer/MlTerrainLayer.cy.d.ts +0 -1
  196. package/dist/components/MlTerrainLayer/MlTerrainLayer.stories.d.ts +0 -14
  197. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +0 -22
  198. package/dist/components/MlThreeJsLayer/MlThreeJsLayer.test.d.ts +0 -1
  199. package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +0 -18
  200. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +0 -13
  201. package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.test.d.ts +0 -1
  202. package/dist/components/MlTransitionGeoJsonLayer/util/transitionFunctions.d.ts +0 -2
  203. package/dist/components/MlUseMapDebugger/MlUseMapDebugger.stories.d.ts +0 -13
  204. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.stories.d.ts +0 -13
  205. package/dist/components/MlVectorTileLayer/MlVectorTileLayer.test.d.ts +0 -1
  206. package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +0 -22
  207. package/dist/components/MlWmsLayer/MlWmsLayer.stories.d.ts +0 -13
  208. package/dist/components/MlWmsLayer/MlWmsLayer.test.d.ts +0 -1
  209. package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +0 -30
  210. package/dist/contexts/MapComponentsProvider.test.d.ts +0 -1
  211. package/dist/contexts/SimpleDataProvider.test.d.ts +0 -1
  212. package/dist/hooks/useAddImage/useAddImage.stories.d.ts +0 -14
  213. package/dist/hooks/useAddImage/useaddImage.cy.d.ts +0 -1
  214. package/dist/hooks/useAddProtocol/useAddProtocol.stories.d.ts +0 -22
  215. package/dist/hooks/useCameraFollowPath/useCameraFollowPath.stories.d.ts +0 -18
  216. package/dist/hooks/useGpx/lib/gpxConverter.d.ts +0 -11
  217. package/dist/hooks/useGpx/useGpx.stories.d.ts +0 -10
  218. package/dist/hooks/useLayer.test.d.ts +0 -1
  219. package/dist/hooks/useLayerEvent.d.ts +0 -2
  220. package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +0 -10
  221. package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +0 -10
  222. package/dist/hooks/useMap.test.d.ts +0 -1
  223. package/dist/hooks/useMapState.stories.d.ts +0 -14
  224. package/dist/hooks/useSources.stories.d.ts +0 -13
  225. package/dist/setupTests.d.ts +0 -13
  226. package/dist/stories/components/Readme.d.ts +0 -2
  227. package/dist/ui_components/AddLayerButton/AddLayerButton.stories.d.ts +0 -13
  228. package/dist/ui_components/LayerList/LayerList.stories.d.ts +0 -15
  229. package/dist/ui_components/SelectStyleButton/SelectStyleButton.stories.d.ts +0 -15
  230. package/dist/ui_components/SpeedDial/SpeedDial.stories.d.ts +0 -21
  231. package/dist/util/index.d.ts +0 -3
  232. package/dist/util/layerRemovalTest.d.ts +0 -2
  233. package/dist/util/sourceRemovalTest.d.ts +0 -2
@@ -1,30 +1,30 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- /**
4
- * Renders obj or gltf 3D Models on the MapLibreMap referenced by props.mapId
5
- *
6
- * @component
7
- */
8
- export interface MlThreeJsLayerProps {
9
- mapId?: string;
10
- init?: () => void;
11
- onDone?: () => void;
12
- }
13
- declare const MlThreeJsLayer: {
14
- (props: MlThreeJsLayerProps): JSX.Element;
15
- propTypes: {
16
- /**
17
- * Id of the target MapLibre instance in mapContext
18
- */
19
- mapId: PropTypes.Requireable<string>;
20
- /**
21
- * function that gets called when initialized
22
- */
23
- init: PropTypes.Requireable<(...args: any[]) => any>;
24
- /**
25
- * function that gets called when models are loaded
26
- */
27
- onDone: PropTypes.Requireable<(...args: any[]) => any>;
28
- };
29
- };
30
- export default MlThreeJsLayer;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ /**
4
+ * Renders obj or gltf 3D Models on the MapLibreMap referenced by props.mapId
5
+ *
6
+ * @component
7
+ */
8
+ export interface MlThreeJsLayerProps {
9
+ mapId?: string;
10
+ init?: () => void;
11
+ onDone?: () => void;
12
+ }
13
+ declare const MlThreeJsLayer: {
14
+ (props: MlThreeJsLayerProps): React.JSX.Element;
15
+ propTypes: {
16
+ /**
17
+ * Id of the target MapLibre instance in mapContext
18
+ */
19
+ mapId: PropTypes.Requireable<string>;
20
+ /**
21
+ * function that gets called when initialized
22
+ */
23
+ init: PropTypes.Requireable<(...args: any[]) => any>;
24
+ /**
25
+ * function that gets called when models are loaded
26
+ */
27
+ onDone: PropTypes.Requireable<(...args: any[]) => any>;
28
+ };
29
+ };
30
+ export default MlThreeJsLayer;
@@ -1,10 +1,12 @@
1
- /// <reference types="react" />
2
- import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
3
- type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
4
- transitionTime: number;
5
- };
6
- /**
7
- * Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
8
- */
9
- declare const MlTransitionGeoJsonLayer: (props: MlTransitionGeoJsonLayerProps) => JSX.Element;
10
- export default MlTransitionGeoJsonLayer;
1
+ import React from 'react';
2
+ import { Feature } from '@turf/turf';
3
+ import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
4
+ export type MlTransitionGeoJsonLayerProps = MlGeoJsonLayerProps & {
5
+ transitionTime?: number;
6
+ geojson?: Feature | GeoJSON.Feature;
7
+ };
8
+ /**
9
+ * Adds source and layer of types "line", "fill" or "circle" to display GeoJSON data on the map.
10
+ */
11
+ declare const MlTransitionGeoJsonLayer: (props: MlTransitionGeoJsonLayerProps) => React.JSX.Element;
12
+ export default MlTransitionGeoJsonLayer;
@@ -1,22 +1,18 @@
1
- export default MlUseMapDebugger;
2
- /**
3
- * Renders a collapsable top-drawer containing live map debug information
4
- *
5
- * @param {object} props
6
- * @param {string} props.mapId Id of the target MapLibre instance in mapContext
7
- *
8
- * @component
9
- */
10
- declare function MlUseMapDebugger(props: {
11
- mapId: string;
12
- }): JSX.Element;
13
- declare namespace MlUseMapDebugger {
14
- namespace defaultProps {
15
- const mapId: undefined;
16
- }
17
- namespace propTypes {
18
- const mapId_1: PropTypes.Requireable<string>;
19
- export { mapId_1 as mapId };
20
- }
21
- }
22
- import PropTypes from "prop-types";
1
+ import React from "react";
2
+ export interface MlUseMapDebuggerProps {
3
+ mapId?: string;
4
+ watch?: string[];
5
+ filter?: {
6
+ [key: string]: any;
7
+ };
8
+ }
9
+ /**
10
+ * Renders a collapsible top-drawer containing live map debug information
11
+ *
12
+ * @param {MlUseMapDebuggerProps} props
13
+ * @param {string} props.mapId Id of the target MapLibre instance in mapContext
14
+ *
15
+ * @component
16
+ */
17
+ declare const MlUseMapDebugger: React.FC<MlUseMapDebuggerProps>;
18
+ export default MlUseMapDebugger;
@@ -1,19 +1,19 @@
1
- /// <reference types="react" />
2
- import { LayerSpecification } from 'maplibre-gl';
3
- import { VectorSourceSpecification } from 'maplibre-gl';
4
- export type MlVectorTileLayerProps = {
5
- mapId?: string;
6
- insertBeforeLayer?: string;
7
- layerId?: string;
8
- sourceOptions?: VectorSourceSpecification;
9
- url?: string;
10
- layers: LayerSpecification[];
11
- };
12
- /**
13
- * Adds a vector-tile source and 0...n vector-tile-layers to the MapLibre instance referenced by
14
- * props.mapId
15
- *
16
- * @component
17
- */
18
- declare const MlVectorTileLayer: (props: MlVectorTileLayerProps) => JSX.Element;
19
- export default MlVectorTileLayer;
1
+ import React from 'react';
2
+ import { LayerSpecification } from 'maplibre-gl';
3
+ import { VectorSourceSpecification } from 'maplibre-gl';
4
+ export type MlVectorTileLayerProps = {
5
+ mapId?: string;
6
+ insertBeforeLayer?: string;
7
+ layerId?: string;
8
+ sourceOptions?: VectorSourceSpecification;
9
+ url?: string;
10
+ layers: LayerSpecification[];
11
+ };
12
+ /**
13
+ * Adds a vector-tile source and 0...n vector-tile-layers to the MapLibre instance referenced by
14
+ * props.mapId
15
+ *
16
+ * @component
17
+ */
18
+ declare const MlVectorTileLayer: (props: MlVectorTileLayerProps) => React.JSX.Element;
19
+ export default MlVectorTileLayer;
@@ -1,22 +1,29 @@
1
- export default MlWmsFeatureInfoPopup;
2
- /**
3
- * TODO: Add short & useful description
4
- *
5
- * @param {object} props
6
- * @param {string} props.mapId Id of the target MapLibre instance in mapContext
7
- *
8
- * @component
9
- */
10
- declare function MlWmsFeatureInfoPopup(props: {
11
- mapId: string;
12
- }): JSX.Element;
13
- declare namespace MlWmsFeatureInfoPopup {
14
- namespace defaultProps {
15
- const mapId: undefined;
16
- }
17
- namespace propTypes {
18
- const mapId_1: PropTypes.Requireable<string>;
19
- export { mapId_1 as mapId };
20
- }
21
- }
22
- import PropTypes from "prop-types";
1
+ import React from "react";
2
+ import PropTypes from "prop-types";
3
+ export interface MlWmsFeatureInfoPopupProps {
4
+ /**
5
+ * Id of the target MapLibre instance in mapContext
6
+ */
7
+ mapId?: string;
8
+ }
9
+ /**
10
+ * TODO: Add short & useful description
11
+ *
12
+ * @param {object} props
13
+ * @param {string} props.mapId Id of the target MapLibre instance in mapContext
14
+ *
15
+ * @component
16
+ */
17
+ declare const MlWmsFeatureInfoPopup: {
18
+ (props: MlWmsFeatureInfoPopupProps): React.JSX.Element;
19
+ defaultProps: {
20
+ mapId: undefined;
21
+ };
22
+ propTypes: {
23
+ /**
24
+ * Id of the target MapLibre instance in mapContext
25
+ */
26
+ mapId: PropTypes.Requireable<string>;
27
+ };
28
+ };
29
+ export default MlWmsFeatureInfoPopup;
@@ -1,104 +1,104 @@
1
- /// <reference types="react" />
2
- import PropTypes from 'prop-types';
3
- import { RasterLayerSpecification, RasterSourceSpecification } from 'maplibre-gl';
4
- interface MlWmsLayerProps {
5
- urlParameters?: {
6
- [key: string]: string;
7
- };
8
- url: string;
9
- visible?: boolean;
10
- attribution?: string;
11
- mapId?: string;
12
- sourceOptions?: RasterSourceSpecification;
13
- layerOptions?: RasterLayerSpecification;
14
- insertBeforeLayer?: string;
15
- layerId?: string;
16
- }
17
- /**
18
- * Adds a WMS raster source & layer to the maplibre-gl instance
19
- *
20
- * @param {object} props
21
- * @param {object} props.urlParameters URL query parameters that will be added to the WMS URL. A layers property (string) is mandatory. Any value defined on this attribute will extend the default object
22
- * @param {string} props.url WMS URL
23
- * @param {bool} props.visible Sets layer "visibility" property to "visible" if true or "none" if false
24
- * @param {string} props.attribution MapLibre attribution shown in the bottom right of the map, if this layer is visible
25
- * @param {string} props.mapId Id of the target MapLibre instance in mapContext
26
- * @param {object} props.sourceOptions Object that is passed to the MapLibre.addSource call as config option parameter
27
- * @param {object} props.layerOptions Object that is passed to the MapLibre.addLayer call as config option parameter
28
- * @param {string} props.insertBeforeLayer Id of an existing layer in the mapLibre instance to help specify the layer order
29
- This layer will be visually beneath the layer with the "insertBeforeLayer" id
30
- *
31
- * @component
32
- */
33
- declare const MlWmsLayer: {
34
- (props: MlWmsLayerProps): JSX.Element;
35
- defaultProps: {
36
- visible: boolean;
37
- urlParameters: {
38
- bbox: string;
39
- format: string;
40
- service: string;
41
- version: string;
42
- request: string;
43
- srs: string;
44
- width: number;
45
- height: number;
46
- styles: string;
47
- };
48
- attribution: string;
49
- sourceOptions: {
50
- minZoom: number;
51
- maxZoom: number;
52
- };
53
- layerOptions: {
54
- minZoom: number;
55
- maxZoom: number;
56
- };
57
- };
58
- propTypes: {
59
- /**
60
- * WMS URL
61
- */
62
- url: PropTypes.Validator<string>;
63
- /**
64
- * URL query parameters that will be added to the WMS URL. A layers property (string) is mandatory. Any value defined on this attribute will extend the default object.
65
- */
66
- urlParameters: PropTypes.Requireable<PropTypes.InferProps<{
67
- layers: PropTypes.Validator<string>;
68
- bbox: PropTypes.Requireable<string>;
69
- format: PropTypes.Requireable<string>;
70
- service: PropTypes.Requireable<string>;
71
- version: PropTypes.Requireable<string>;
72
- request: PropTypes.Requireable<string>;
73
- srs: PropTypes.Requireable<string>;
74
- width: PropTypes.Requireable<number>;
75
- height: PropTypes.Requireable<number>;
76
- }>>;
77
- /**
78
- * Id of the target MapLibre instance in mapContext
79
- */
80
- mapId: PropTypes.Requireable<string>;
81
- /**
82
- * MapLibre attribution shown in the bottom right of the map, if this layer is visible
83
- */
84
- attribution: PropTypes.Requireable<string>;
85
- /**
86
- * Object that is passed to the MapLibre.addLayer call as config option parameter
87
- */
88
- layerOptions: PropTypes.Requireable<object>;
89
- /**
90
- * Object that is passed to the MapLibre.addSource call as config option parameter
91
- */
92
- sourceOptions: PropTypes.Requireable<object>;
93
- /**
94
- * Id of an existing layer in the mapLibre instance to help specify the layer order
95
- * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
96
- */
97
- insertBeforeLayer: PropTypes.Requireable<string>;
98
- /**
99
- * Sets layer "visibility" property to "visible" if true or "none" if false
100
- */
101
- visible: PropTypes.Requireable<boolean>;
102
- };
103
- };
104
- export default MlWmsLayer;
1
+ import React from 'react';
2
+ import PropTypes from 'prop-types';
3
+ import { RasterLayerSpecification, RasterSourceSpecification } from 'maplibre-gl';
4
+ export interface MlWmsLayerProps {
5
+ urlParameters?: {
6
+ [key: string]: string;
7
+ };
8
+ url: string;
9
+ visible?: boolean;
10
+ attribution?: string;
11
+ mapId?: string;
12
+ sourceOptions?: RasterSourceSpecification;
13
+ layerOptions?: RasterLayerSpecification;
14
+ insertBeforeLayer?: string;
15
+ layerId?: string;
16
+ }
17
+ /**
18
+ * Adds a WMS raster source & layer to the maplibre-gl instance
19
+ *
20
+ * @param {object} props
21
+ * @param {object} props.urlParameters URL query parameters that will be added to the WMS URL. A layers property (string) is mandatory. Any value defined on this attribute will extend the default object
22
+ * @param {string} props.url WMS URL
23
+ * @param {bool} props.visible Sets layer "visibility" property to "visible" if true or "none" if false
24
+ * @param {string} props.attribution MapLibre attribution shown in the bottom right of the map, if this layer is visible
25
+ * @param {string} props.mapId Id of the target MapLibre instance in mapContext
26
+ * @param {object} props.sourceOptions Object that is passed to the MapLibre.addSource call as config option parameter
27
+ * @param {object} props.layerOptions Object that is passed to the MapLibre.addLayer call as config option parameter
28
+ * @param {string} props.insertBeforeLayer Id of an existing layer in the mapLibre instance to help specify the layer order
29
+ This layer will be visually beneath the layer with the "insertBeforeLayer" id
30
+ *
31
+ * @component
32
+ */
33
+ declare const MlWmsLayer: {
34
+ (props: MlWmsLayerProps): React.JSX.Element;
35
+ defaultProps: {
36
+ visible: boolean;
37
+ urlParameters: {
38
+ bbox: string;
39
+ format: string;
40
+ service: string;
41
+ version: string;
42
+ request: string;
43
+ srs: string;
44
+ width: number;
45
+ height: number;
46
+ styles: string;
47
+ };
48
+ attribution: string;
49
+ sourceOptions: {
50
+ minZoom: number;
51
+ maxZoom: number;
52
+ };
53
+ layerOptions: {
54
+ minZoom: number;
55
+ maxZoom: number;
56
+ };
57
+ };
58
+ propTypes: {
59
+ /**
60
+ * WMS URL
61
+ */
62
+ url: PropTypes.Validator<string>;
63
+ /**
64
+ * URL query parameters that will be added to the WMS URL. A layers property (string) is mandatory. Any value defined on this attribute will extend the default object.
65
+ */
66
+ urlParameters: PropTypes.Requireable<PropTypes.InferProps<{
67
+ layers: PropTypes.Validator<string>;
68
+ bbox: PropTypes.Requireable<string>;
69
+ format: PropTypes.Requireable<string>;
70
+ service: PropTypes.Requireable<string>;
71
+ version: PropTypes.Requireable<string>;
72
+ request: PropTypes.Requireable<string>;
73
+ srs: PropTypes.Requireable<string>;
74
+ width: PropTypes.Requireable<number>;
75
+ height: PropTypes.Requireable<number>;
76
+ }>>;
77
+ /**
78
+ * Id of the target MapLibre instance in mapContext
79
+ */
80
+ mapId: PropTypes.Requireable<string>;
81
+ /**
82
+ * MapLibre attribution shown in the bottom right of the map, if this layer is visible
83
+ */
84
+ attribution: PropTypes.Requireable<string>;
85
+ /**
86
+ * Object that is passed to the MapLibre.addLayer call as config option parameter
87
+ */
88
+ layerOptions: PropTypes.Requireable<object>;
89
+ /**
90
+ * Object that is passed to the MapLibre.addSource call as config option parameter
91
+ */
92
+ sourceOptions: PropTypes.Requireable<object>;
93
+ /**
94
+ * Id of an existing layer in the mapLibre instance to help specify the layer order
95
+ * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
96
+ */
97
+ insertBeforeLayer: PropTypes.Requireable<string>;
98
+ /**
99
+ * Sets layer "visibility" property to "visible" if true or "none" if false
100
+ */
101
+ visible: PropTypes.Requireable<boolean>;
102
+ };
103
+ };
104
+ export default MlWmsLayer;