@mapcomponents/react-maplibre 1.3.3 → 1.5.0-2

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 (172) hide show
  1. package/CHANGELOG.md +163 -38
  2. package/CODE_OF_CONDUCT.md +70 -70
  3. package/CONTRIBUTING.md +157 -149
  4. package/README.md +1 -1
  5. package/docs_md/anatomy_of_a_mapcomponent.md +34 -37
  6. package/eslint.config.cjs +3 -0
  7. package/package.json +193 -224
  8. package/project.json +21 -0
  9. package/tsconfig.lib.json +29 -0
  10. package/vite.config.ts +61 -0
  11. package/.eslintrc.cjs +0 -33
  12. package/dist/assets/index.cjs-Iqz0mZaU.css +0 -98
  13. package/dist/assets/index.esm-Iqz0mZaU.css +0 -98
  14. package/dist/index.cjs.js +0 -22120
  15. package/dist/index.cjs.js.map +0 -1
  16. package/dist/index.esm.js +0 -22000
  17. package/dist/index.esm.js.map +0 -1
  18. package/dist/src/components/MapLibreMap/MapLibreMap.d.ts +0 -34
  19. package/dist/src/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +0 -120
  20. package/dist/src/components/MlCenterPosition/MlCenterPosition.d.ts +0 -36
  21. package/dist/src/components/MlClientSearch/MlClientSearch.d.ts +0 -30
  22. package/dist/src/components/MlClientSearch/lib/SearchContext.d.ts +0 -13
  23. package/dist/src/components/MlClientSearch/lib/SearchForm.d.ts +0 -2
  24. package/dist/src/components/MlClientSearch/lib/createGeojsonFeature.d.ts +0 -4
  25. package/dist/src/components/MlComponentTemplate/MlComponentTemplate.d.ts +0 -18
  26. package/dist/src/components/MlComponentTemplate/MlComponentTemplate.stories_.d.ts +0 -14
  27. package/dist/src/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +0 -22
  28. package/dist/src/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +0 -13
  29. package/dist/src/components/MlCreatePdfForm/lib/PdfContext.d.ts +0 -8
  30. package/dist/src/components/MlCreatePdfForm/lib/PdfForm.d.ts +0 -25
  31. package/dist/src/components/MlCreatePdfForm/lib/PdfPreview.d.ts +0 -26
  32. package/dist/src/components/MlCreatePdfForm/lib/pdf.templates.d.ts +0 -11
  33. package/dist/src/components/MlCreatePngButton/MlCreatePngButton.d.ts +0 -22
  34. package/dist/src/components/MlFeatureEditor/MlFeatureEditor.d.ts +0 -5
  35. package/dist/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +0 -62
  36. package/dist/src/components/MlFollowGps/MlFollowGps.d.ts +0 -81
  37. package/dist/src/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +0 -98
  38. package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +0 -9
  39. package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +0 -9
  40. package/dist/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +0 -4
  41. package/dist/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +0 -5
  42. package/dist/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +0 -23
  43. package/dist/src/components/MlGlobeButton/MlGlobeButton.d.ts +0 -28
  44. package/dist/src/components/MlGpxViewer/MlGpxViewer.d.ts +0 -31
  45. package/dist/src/components/MlGpxViewer/util/GeoJsonContext.d.ts +0 -10
  46. package/dist/src/components/MlGpxViewer/util/GeoJsonProvider.d.ts +0 -5
  47. package/dist/src/components/MlGpxViewer/util/Metadata.d.ts +0 -7
  48. package/dist/src/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +0 -11
  49. package/dist/src/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +0 -4
  50. package/dist/src/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +0 -39
  51. package/dist/src/components/MlLayer/MlLayer.d.ts +0 -33
  52. package/dist/src/components/MlLayerMagnify/MlLayerMagnify.d.ts +0 -33
  53. package/dist/src/components/MlLayerSwipe/MlLayerSwipe.d.ts +0 -26
  54. package/dist/src/components/MlLayerSwipe/assets/SwipeIcon.d.ts +0 -10
  55. package/dist/src/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +0 -29
  56. package/dist/src/components/MlLayerSwitcher/components/LayerBox.d.ts +0 -10
  57. package/dist/src/components/MlMarker/MlMarker.d.ts +0 -29
  58. package/dist/src/components/MlMeasureTool/MlMeasureTool.d.ts +0 -37
  59. package/dist/src/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +0 -55
  60. package/dist/src/components/MlNavigationCompass/MlNavigationCompass.d.ts +0 -33
  61. package/dist/src/components/MlNavigationCompass/assets/CompassBackground.d.ts +0 -9
  62. package/dist/src/components/MlNavigationCompass/assets/CompassNeedle.d.ts +0 -9
  63. package/dist/src/components/MlNavigationTools/MlNavigationTools.d.ts +0 -60
  64. package/dist/src/components/MlOgcApiFeatures/MlOgcApiFeatures.d.ts +0 -45
  65. package/dist/src/components/MlOrderLayers/MlOrderLayers.d.ts +0 -21
  66. package/dist/src/components/MlScaleReference/MlScaleReference.d.ts +0 -9
  67. package/dist/src/components/MlShareMapState/MlShareMapState.d.ts +0 -35
  68. package/dist/src/components/MlSketchTool/MlSketchTool.d.ts +0 -50
  69. package/dist/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +0 -40
  70. package/dist/src/components/MlSpatialElevationProfile/util/getElevationData.d.ts +0 -13
  71. package/dist/src/components/MlTemporalController/MlTemporalController.d.ts +0 -181
  72. package/dist/src/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +0 -20
  73. package/dist/src/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +0 -22
  74. package/dist/src/components/MlTemporalController/utils/paintPicker.d.ts +0 -59
  75. package/dist/src/components/MlTemporalController/utils/useFilterData.d.ts +0 -14
  76. package/dist/src/components/MlTerrainLayer/MlTerrainLayer.d.ts +0 -28
  77. package/dist/src/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +0 -13
  78. package/dist/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +0 -12
  79. package/dist/src/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +0 -21
  80. package/dist/src/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +0 -22
  81. package/dist/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +0 -22
  82. package/dist/src/components/MlWmsLayer/MlWmsLayer.d.ts +0 -58
  83. package/dist/src/components/MlWmsLoader/MlWmsLoader.d.ts +0 -125
  84. package/dist/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +0 -4
  85. package/dist/src/components/MlWmsLoader/utils/WMSLinks.d.ts +0 -8
  86. package/dist/src/contexts/LayerContext.d.ts +0 -59
  87. package/dist/src/contexts/MapContext.d.ts +0 -26
  88. package/dist/src/contexts/SimpleDataContext.d.ts +0 -4
  89. package/dist/src/contexts/SimpleDataProvider.d.ts +0 -12
  90. package/dist/src/decorators/EmptyMapDecorator.d.ts +0 -4
  91. package/dist/src/decorators/GeoJsonMapDecorator.d.ts +0 -4
  92. package/dist/src/decorators/LowZoomDecorator.d.ts +0 -4
  93. package/dist/src/decorators/MapContextDecorator.d.ts +0 -7
  94. package/dist/src/decorators/MapContextDecoratorHooks.d.ts +0 -4
  95. package/dist/src/decorators/MapContextReduxStoreDecorator.d.ts +0 -7
  96. package/dist/src/decorators/MultiMapContextDecorator.d.ts +0 -4
  97. package/dist/src/decorators/NoNavToolsDecorator.d.ts +0 -4
  98. package/dist/src/decorators/ThemeDecorator.d.ts +0 -5
  99. package/dist/src/hooks/useAddImage/useAddImage.d.ts +0 -20
  100. package/dist/src/hooks/useAddProtocol/useAddProtocol.d.ts +0 -23
  101. package/dist/src/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +0 -35
  102. package/dist/src/hooks/useExportMap/index.d.ts +0 -11
  103. package/dist/src/hooks/useExportMap/lib.d.ts +0 -52
  104. package/dist/src/hooks/useFeatureEditor/useFeatureEditor.d.ts +0 -46
  105. package/dist/src/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -116
  106. package/dist/src/hooks/useFitLayerBounds.d.ts +0 -8
  107. package/dist/src/hooks/useGpx/useGpx.d.ts +0 -26
  108. package/dist/src/hooks/useLayer.d.ts +0 -36
  109. package/dist/src/hooks/useLayerContext.d.ts +0 -2
  110. package/dist/src/hooks/useLayerFilter/useLayerFilter.d.ts +0 -8
  111. package/dist/src/hooks/useLayerHoverPopup/LayerHoverPopup.d.ts +0 -24
  112. package/dist/src/hooks/useMap.d.ts +0 -14
  113. package/dist/src/hooks/useMapState.d.ts +0 -37
  114. package/dist/src/hooks/useSource.d.ts +0 -17
  115. package/dist/src/hooks/useWms.d.ts +0 -26
  116. package/dist/src/index.d.ts +0 -126
  117. package/dist/src/omt_styles/bright.d.ts +0 -2495
  118. package/dist/src/omt_styles/config.d.ts +0 -7
  119. package/dist/src/omt_styles/gruvbox.d.ts +0 -2420
  120. package/dist/src/omt_styles/medieval_kingdom.d.ts +0 -2420
  121. package/dist/src/omt_styles/monokai.d.ts +0 -2420
  122. package/dist/src/omt_styles/oceanic_next.d.ts +0 -2420
  123. package/dist/src/omt_styles/solarized.d.ts +0 -2420
  124. package/dist/src/protocol_handlers/csv.d.ts +0 -8
  125. package/dist/src/protocol_handlers/mbtiles.d.ts +0 -74
  126. package/dist/src/protocol_handlers/osm.d.ts +0 -10
  127. package/dist/src/protocol_handlers/topojson.d.ts +0 -9
  128. package/dist/src/protocol_handlers/utils/getProtocolData.d.ts +0 -1
  129. package/dist/src/protocol_handlers/utils/protocolPathParser.d.ts +0 -7
  130. package/dist/src/protocol_handlers/xml.d.ts +0 -10
  131. package/dist/src/stores/map.store.d.ts +0 -105
  132. package/dist/src/ui_components/AddLayerButton/AddLayerButton.d.ts +0 -17
  133. package/dist/src/ui_components/AddLayerButton/AddLayerPopup.d.ts +0 -15
  134. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +0 -8
  135. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +0 -10
  136. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +0 -13
  137. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +0 -10
  138. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +0 -10
  139. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +0 -6
  140. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +0 -7
  141. package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +0 -6
  142. package/dist/src/ui_components/ColorPicker/ColorPicker.d.ts +0 -15
  143. package/dist/src/ui_components/ColorPicker/transformers.d.ts +0 -10
  144. package/dist/src/ui_components/ConfirmDialog.d.ts +0 -16
  145. package/dist/src/ui_components/DemoDescriptions.d.ts +0 -12
  146. package/dist/src/ui_components/Dropzone.d.ts +0 -6
  147. package/dist/src/ui_components/ImageLoader.d.ts +0 -10
  148. package/dist/src/ui_components/LayerList/LayerList.d.ts +0 -7
  149. package/dist/src/ui_components/LayerList/LayerListFolder.d.ts +0 -9
  150. package/dist/src/ui_components/LayerList/LayerListItem.d.ts +0 -26
  151. package/dist/src/ui_components/LayerList/LayerListItemFactory.d.ts +0 -18
  152. package/dist/src/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +0 -19
  153. package/dist/src/ui_components/LayerList/util/LayerPropertyForm.d.ts +0 -10
  154. package/dist/src/ui_components/LayerList/util/SortableContainer.d.ts +0 -7
  155. package/dist/src/ui_components/LayerList/util/input/ColorPicker.d.ts +0 -10
  156. package/dist/src/ui_components/LayerTree/LayerOnMap.d.ts +0 -7
  157. package/dist/src/ui_components/LayerTree/LayerTree.d.ts +0 -6
  158. package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +0 -18
  159. package/dist/src/ui_components/LayerTree/util/LayerPropertyForm.d.ts +0 -9
  160. package/dist/src/ui_components/LayerTree/util/input/ColorPicker.d.ts +0 -7
  161. package/dist/src/ui_components/LoadingOverlayContext.d.ts +0 -4
  162. package/dist/src/ui_components/MapcomponentsTheme.d.ts +0 -36
  163. package/dist/src/ui_components/SelectStyleButton/SelectStyleButton.d.ts +0 -20
  164. package/dist/src/ui_components/SelectStyleButton/SelectStylePopup.d.ts +0 -18
  165. package/dist/src/ui_components/Sidebar.d.ts +0 -13
  166. package/dist/src/ui_components/SpeedDial/SpeedDial.d.ts +0 -14
  167. package/dist/src/ui_components/TopToolbar.d.ts +0 -9
  168. package/dist/src/ui_components/UploadButton.d.ts +0 -8
  169. package/dist/src/util/BubbleForInstructions.d.ts +0 -16
  170. package/dist/src/util/Instructions.d.ts +0 -14
  171. package/eslint.config.mjs +0 -73
  172. package/rollup.config.mjs +0 -62
@@ -1,9 +0,0 @@
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,9 +0,0 @@
1
- import React from 'react';
2
- import { FeatureCollection } from 'geojson';
3
- interface PolygonStylerProps {
4
- geojson: FeatureCollection;
5
- openSidebar: boolean;
6
- setOpenSidebar: (open: boolean) => void;
7
- }
8
- declare const PolygonStyler: React.FC<PolygonStylerProps>;
9
- export default PolygonStyler;
@@ -1,4 +0,0 @@
1
- import { Feature, FeatureCollection } from "geojson";
2
- import { LayerSpecification } from "maplibre-gl";
3
- declare const getDefaulLayerTypeByGeometry: (geojson: Feature | FeatureCollection | undefined) => LayerSpecification["type"];
4
- export default getDefaulLayerTypeByGeometry;
@@ -1,5 +0,0 @@
1
- import { LayerSpecification, RasterLayerSpecification } from 'maplibre-gl';
2
- declare const getDefaultPaintPropsByType: (type: string, defaultPaintOverrides?: {
3
- [key: string]: unknown;
4
- }) => Exclude<LayerSpecification["paint"], RasterLayerSpecification["paint"]>;
5
- export default getDefaultPaintPropsByType;
@@ -1,23 +0,0 @@
1
- import React from "react";
2
- export interface MlGeojsonLayerWithSourceProps {
3
- /**
4
- * Id of the target MapLibre instance in mapContext
5
- */
6
- mapId?: string;
7
- /**
8
- * Id of an existing layer in the mapLibre instance to help specify the layer order
9
- * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
10
- */
11
- insertBeforeLayer?: string;
12
- }
13
- /**
14
- * MlGeojsonLayerWithSource
15
- *
16
- */
17
- declare const MlGeojsonLayerWithSource: {
18
- (props: MlGeojsonLayerWithSourceProps): React.JSX.Element;
19
- defaultProps: {
20
- mapId: string;
21
- };
22
- };
23
- export default MlGeojsonLayerWithSource;
@@ -1,28 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- export interface MlGlobeButtonProps {
3
- /**
4
- * Id of the target MapLibre instance in mapContext
5
- */
6
- mapId?: string;
7
- /**
8
- * Id of an existing layer in the mapLibre instance to help specify the layer order
9
- * This layer will be visually beneath the layer with the "insertBeforeLayer" id.
10
- */
11
- insertBeforeLayer?: string;
12
- /**
13
- * Style object to adjust css definitions of the component.
14
- */
15
- style?: CSSProperties;
16
- /**
17
- * Initial projection mode of the map.
18
- */
19
- mode?: 'globe' | 'mercator';
20
- }
21
- declare const MlGlobeButton: {
22
- (props: MlGlobeButtonProps): React.JSX.Element;
23
- defaultProps: {
24
- mapId: undefined;
25
- mode: string;
26
- };
27
- };
28
- export default MlGlobeButton;
@@ -1,31 +0,0 @@
1
- import React from 'react';
2
- import { FeatureCollection } from 'geojson';
3
- import { MetadataType } from '../../hooks/useGpx/useGpx';
4
- export interface MlGpxViewerProps {
5
- /**
6
- * Id of the target MapLibre instance in mapHook
7
- */
8
- mapId?: string;
9
- /**
10
- * The layerId of an existing layer this layer should be rendered visually beneath
11
- * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
12
- */
13
- insertBeforeLayer?: string;
14
- /**
15
- * Prefix of the component id this component uses when adding elements to the MapLibreGl-instance
16
- */
17
- idPrefix?: string;
18
- gpxData: string | undefined;
19
- onParseGpxData: (arg0: {
20
- geojson: FeatureCollection | undefined;
21
- metadata: MetadataType[];
22
- }) => void;
23
- }
24
- /**
25
- * MlGpxViewer visualizes a given GPX Track on the map
26
- */
27
- declare const MlGpxViewer: {
28
- (props: MlGpxViewerProps): React.JSX.Element;
29
- defaultProps: {};
30
- };
31
- export default MlGpxViewer;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { FeatureCollection } from "geojson";
3
- type ContextProps = {
4
- data: FeatureCollection;
5
- setData: (data: FeatureCollection) => void;
6
- getEmptyFeatureCollection: () => FeatureCollection;
7
- };
8
- declare const GeoJsonContext: React.Context<Partial<ContextProps>>;
9
- export declare const GeoJsonContextProvider: React.Provider<Partial<ContextProps>>;
10
- export default GeoJsonContext;
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- declare const GeoJsonProvider: ({ children }: {
3
- children: React.JSX.Element;
4
- }) => React.JSX.Element;
5
- export default GeoJsonProvider;
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { MetadataType } from '../../../hooks/useGpx/useGpx';
3
- type Props = {
4
- metadata: MetadataType[];
5
- };
6
- export default function Metadata(props: Props): React.JSX.Element;
7
- export {};
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- interface MlGpxDemoLoaderProps {
3
- open: boolean;
4
- close: () => void;
5
- setGpx: (gpx: string | undefined) => void;
6
- }
7
- /**
8
- * MlGpxDemoLoader returns a button to load a Demo GPX Track into the map.
9
- */
10
- declare const MlGpxDemoLoader: (props: MlGpxDemoLoaderProps) => React.JSX.Element;
11
- export default MlGpxDemoLoader;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export default function MlGpxViewerInstructions(props: {
3
- open: boolean;
4
- }): React.JSX.Element;
@@ -1,39 +0,0 @@
1
- import React from 'react';
2
- import { SymbolLayerSpecification } from 'maplibre-gl';
3
- import { Feature, FeatureCollection } from 'geojson';
4
- export interface MlImageMarkerLayerProps {
5
- /**
6
- * Id of the target MapLibre instance in mapContext
7
- */
8
- mapId?: string;
9
- /**
10
- * The layerId of an existing layer this layer should be rendered visually beneath
11
- * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
12
- */
13
- insertBeforeLayer?: string;
14
- /**
15
- * Id of the layer that will be added by this component to the maplibre-gl instance
16
- */
17
- layerId?: string;
18
- /**
19
- * Id of the image that will be added by this component to the maplibre-gl instance
20
- */
21
- imageId?: string;
22
- /**
23
- * Path or URL to a supported raster image
24
- */
25
- imgSrc?: string;
26
- /**
27
- * Javascript object that is passed the addLayer command as first parameter.
28
- */
29
- options?: {
30
- source?: {
31
- type?: string | undefined;
32
- data: Feature | FeatureCollection | undefined;
33
- };
34
- layout?: SymbolLayerSpecification['layout'];
35
- paint?: SymbolLayerSpecification['paint'];
36
- };
37
- }
38
- declare const MlImageMarkerLayer: (props: MlImageMarkerLayerProps) => React.JSX.Element;
39
- export default MlImageMarkerLayer;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import { useLayerProps } from '../../hooks/useLayer';
3
- import { Feature, FeatureCollection } from 'geojson';
4
- interface MlLayerProps {
5
- /**
6
- * Id of the target MapLibre instance in mapContext
7
- */
8
- mapId?: string;
9
- /**
10
- * The layerId of an existing layer this layer should be rendered visually beneath
11
- * https://maplibre.org/maplibre-gl-js-docs/api/map/#map#addlayer - see "beforeId" property
12
- */
13
- insertBeforeLayer?: string;
14
- /**
15
- * Id of the layer that will be added by this component to the maplibre-gl instance
16
- */
17
- layerId?: string;
18
- /**
19
- * Javascript object that is passed the addLayer command as first parameter.
20
- */
21
- options?: useLayerProps['options'];
22
- /**
23
- * GeoJSON data that is supposed to be rendered by this component.
24
- */
25
- geojson?: Feature | FeatureCollection | undefined;
26
- }
27
- /**
28
- * Basic layer component that create a layer in a MapLibre-gl instance and keeps it updated according to it attribute configuration.
29
- *
30
- * @category Map components
31
- */
32
- declare const MlLayer: (props: MlLayerProps) => React.JSX.Element;
33
- export default MlLayer;
@@ -1,33 +0,0 @@
1
- import React from 'react';
2
- import './style.css';
3
- export interface MlLayerMagnifyProps {
4
- /**
5
- * Id of the first MapLibre instance
6
- */
7
- map1Id: string;
8
- /**
9
- * Id of the second MapLibre instance
10
- */
11
- map2Id: string;
12
- /**
13
- * Size of the "magnifier"-circle
14
- */
15
- magnifierRadius?: number;
16
- /**
17
- * object (React.CSSProperties) that is added to the magnifier default style
18
- */
19
- magnifierStyle: React.CSSProperties | undefined;
20
- }
21
- /**
22
- *
23
- * Hides the MapLibreMap referenced by props.map2Id except for the "magnifier"-circle that reveals
24
- * the map and can be dragged around on top of the MapLibreMap referenced by props.map1Id
25
- */
26
- declare const MlLayerMagnify: {
27
- (props: MlLayerMagnifyProps): React.JSX.Element;
28
- defaultProps: {
29
- magnifierRadius: number;
30
- magnifierStyle: {};
31
- };
32
- };
33
- export default MlLayerMagnify;
@@ -1,26 +0,0 @@
1
- import React from 'react';
2
- import './style.css';
3
- export interface MlLayerSwipeProps {
4
- /**
5
- * Id of the first MapLibre instance.
6
- */
7
- map1Id: string;
8
- /**
9
- * Id of the second MapLibre instance.
10
- */
11
- map2Id: string;
12
- /**
13
- * object (React.CSSProperties) that is added to the button default style
14
- */
15
- buttonStyle: React.CSSProperties | undefined;
16
- }
17
- /**
18
- * creates a split view of 2 synchronised maplibre instances
19
- */
20
- declare const MlLayerSwipe: {
21
- (props: MlLayerSwipeProps): React.JSX.Element;
22
- defaultProps: {
23
- buttonStyle: {};
24
- };
25
- };
26
- export default MlLayerSwipe;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- interface SwipeIconProps {
3
- className?: string;
4
- title?: string;
5
- onClick?: () => void;
6
- style?: React.CSSProperties;
7
- color?: string;
8
- }
9
- declare const SwipeIcon: React.FC<SwipeIconProps>;
10
- export default SwipeIcon;
@@ -1,29 +0,0 @@
1
- import './MlLayerSwitcher.css';
2
- import React from 'react';
3
- type LayerConfig = {
4
- layerId: string;
5
- src?: string;
6
- label: string;
7
- linkedTo?: string;
8
- };
9
- type BaseSourceConfig = {
10
- label?: string;
11
- active?: boolean;
12
- layers: LayerConfig[];
13
- };
14
- type DetailLayerConfig = {
15
- label?: string;
16
- layers: LayerConfig[];
17
- };
18
- export type MlLayerSwitcherProps = {
19
- baseSourceConfig: BaseSourceConfig;
20
- detailLayerConfig: DetailLayerConfig;
21
- mapId?: string;
22
- };
23
- /**
24
- * @component
25
- *
26
- *
27
- */
28
- declare const MlLayerSwitcher: React.FC<MlLayerSwitcherProps>;
29
- export default MlLayerSwitcher;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- interface LayerBoxProps {
3
- mapId?: string;
4
- layerId: string;
5
- thumbnail?: string;
6
- label: string;
7
- handleLayerBoxClick?: (layerId: string) => void;
8
- }
9
- declare const LayerBox: React.FC<LayerBoxProps>;
10
- export default LayerBox;
@@ -1,29 +0,0 @@
1
- import React from 'react';
2
- export interface MlMarkerProps {
3
- /** ID of the map to add the marker to */
4
- mapId?: string;
5
- /** Layer ID before which to insert the marker */
6
- insertBeforeLayer?: string;
7
- /** Longitude of the marker position */
8
- lng: number;
9
- /** Latitude of the marker position */
10
- lat: number;
11
- /** HTML content for the marker popup */
12
- content?: string;
13
- /** CSS properties to apply to the marker dot */
14
- markerStyle?: React.CSSProperties;
15
- /** CSS properties to apply to the content container */
16
- containerStyle?: React.CSSProperties;
17
- /** CSS properties to apply to the iframe element */
18
- iframeStyle?: React.CSSProperties;
19
- /** CSS properties to apply to the body of the iframe */
20
- iframeBodyStyle?: React.CSSProperties;
21
- /** Offset in pixels between the marker and its content */
22
- contentOffset?: number;
23
- /** Whether mouse events pass through the marker content */
24
- passEventsThrough?: boolean;
25
- /** Anchor position of the marker relative to its coordinates */
26
- anchor?: 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
27
- }
28
- declare const MlMarker: ({ passEventsThrough, contentOffset, ...props }: MlMarkerProps) => React.ReactPortal | null;
29
- export default MlMarker;
@@ -1,37 +0,0 @@
1
- import React from 'react';
2
- import * as turf from '@turf/turf';
3
- import { Feature } from 'geojson';
4
- export interface MlMeasureToolOnChangeOptions {
5
- value: number;
6
- unit: string | undefined;
7
- geojson: Feature;
8
- geometries?: [];
9
- }
10
- export interface MlMeasureToolProps {
11
- /**
12
- * String that specify if the Tool measures an area ("polygon") or length ("line")
13
- */
14
- measureType?: 'polygon' | 'line';
15
- /**
16
- * String that dictates which unit of measurement is used
17
- */
18
- unit?: turf.Units;
19
- /**
20
- * Callback function that is called each time measurment geometry within has changed within MlMeasureTool.
21
- * First parameter is the new GeoJson feature.
22
- */
23
- onChange?: (options: MlMeasureToolOnChangeOptions) => void;
24
- /**
25
- * Callback function that is called by the end of drawing geometries.
26
- */
27
- onFinish?: () => void;
28
- }
29
- declare const MlMeasureTool: {
30
- (props: MlMeasureToolProps): React.JSX.Element;
31
- defaultProps: {
32
- mapId: undefined;
33
- measureType: string;
34
- unit: string;
35
- };
36
- };
37
- export default MlMeasureTool;
@@ -1,55 +0,0 @@
1
- import React from 'react';
2
- import { SxProps } from '@mui/material';
3
- import * as turf from '@turf/turf';
4
- import { Feature } from 'geojson';
5
- export interface MlMultiMeasureToolProps {
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
- */
14
- insertBeforeLayer?: string;
15
- /**
16
- * Style attribute for the button-style
17
- * https://mui.com/system/getting-started/the-sx-prop/
18
- */
19
- buttonStyleOverride?: SxProps;
20
- /**
21
- * String that specify if the Tool measures an area ("polygon") or length ("line")
22
- */
23
- measureType?: 'polygon' | 'line';
24
- /**
25
- * Boolean which decides if the user can switch between measure modes
26
- */
27
- multiType?: boolean;
28
- /**
29
- * String that dictates which unit of measurement is used
30
- */
31
- unit?: turf.Units;
32
- /**
33
- * Callback function that is called each time measurment geometry within has changed within MlMeasureTool.
34
- * First parameter is the new GeoJson feature.
35
- */
36
- onChange?: (options: {
37
- value: number;
38
- unit?: string;
39
- geojson: Feature;
40
- geometries?: [];
41
- }) => void;
42
- /**
43
- * Callback function that is called by the end of drawing geometries.
44
- */
45
- onFinish?: () => void;
46
- }
47
- declare const MlMultiMeasureTool: {
48
- (props: MlMultiMeasureToolProps): React.JSX.Element;
49
- defaultProps: {
50
- mapId: undefined;
51
- measureType: string;
52
- buttonStyleOverride: {};
53
- };
54
- };
55
- export default MlMultiMeasureTool;
@@ -1,33 +0,0 @@
1
- import React, { CSSProperties } from 'react';
2
- export interface MlNavigationCompassProps {
3
- /**
4
- * Id of the target MapLibre instance in mapHook
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
- * Style object to adjust css definitions of the component.
14
- */
15
- style?: CSSProperties;
16
- /**
17
- * Style object to adjust css definitions of the background.
18
- */
19
- backgroundStyle?: CSSProperties;
20
- /**
21
- * Style object to adjust css definitions of the compass needle.
22
- */
23
- needleStyle?: CSSProperties;
24
- }
25
- /**
26
- * Navigation component that displays a compass component which indicates the current oriantation of the map it is registered for and offers controls to turn the bearing 90° left/right or reset north to point up.
27
- *
28
- * All style props are applied using @mui/material/styled to allow more complex css selectors.
29
- *
30
- * @component
31
- */
32
- declare const MlNavigationCompass: (props: MlNavigationCompassProps) => React.JSX.Element;
33
- export default MlNavigationCompass;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface CompassBackgroundProps {
3
- className?: string;
4
- title?: string;
5
- onClick?: () => void;
6
- style?: React.CSSProperties;
7
- }
8
- declare const CompassBackground: React.FC<CompassBackgroundProps>;
9
- export default CompassBackground;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface CompassNeedleProps {
3
- className?: string;
4
- title?: string;
5
- onClick?: () => void;
6
- style?: React.CSSProperties;
7
- }
8
- declare const CompassNeedle: React.FC<CompassNeedleProps>;
9
- export default CompassNeedle;
@@ -1,60 +0,0 @@
1
- import React from 'react';
2
- import { SxProps } from '@mui/material';
3
- export interface MlNavigationToolsProps {
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
- * Show 3D button
15
- */
16
- show3DButton?: boolean;
17
- /**
18
- * Show global button
19
- */
20
- showGlobeButton?: boolean;
21
- /**
22
- * Show zoom button
23
- */
24
- showZoomButtons?: boolean;
25
- /**
26
- * Show follow GPS button
27
- */
28
- showFollowGpsButton?: boolean;
29
- /**
30
- * Show center on current position button
31
- */
32
- showCenterLocationButton?: boolean;
33
- /**
34
- * Additional JSX Elements to be rendered below MlNavigationTools buttons
35
- */
36
- children?: React.JSX.Element;
37
- /**
38
- * Style attribute for NavigationTools container
39
- */
40
- sx?: SxProps;
41
- /**
42
- * Style attribute for NavigationTools container
43
- */
44
- mediaIsMobile?: boolean;
45
- }
46
- /**
47
- * @component
48
- */
49
- declare const MlNavigationTools: {
50
- (props: MlNavigationToolsProps): React.JSX.Element;
51
- defaultProps: {
52
- mapId: undefined;
53
- show3DButton: boolean;
54
- showGlobeButton: boolean;
55
- showFollowGpsButton: boolean;
56
- showCenterLocationButton: boolean;
57
- showZoomButtons: boolean;
58
- };
59
- };
60
- export default MlNavigationTools;
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import { MlGeoJsonLayerProps } from '../MlGeoJsonLayer/MlGeoJsonLayer';
3
- export type MlOgcApiFeaturesProps = {
4
- visible?: boolean;
5
- /**
6
- * Id of the target MapLibre instance in mapContext
7
- */
8
- mapId?: string;
9
- /**
10
- * The url of OGC API
11
- */
12
- ogcApiUrl: URL;
13
- /**
14
- * The additional query parameters of OGC API
15
- */
16
- ogcApiFeatureParams?: OgcApiFeaturesParamsTypes;
17
- /**
18
- * Fetches the features everytime (based on the current bbox) when the map gets moved
19
- */
20
- reloadFeaturesOnMapMove?: boolean;
21
- /**
22
- * Geojson Layer props. But omit 'geojson' because it gets set from the OGC API Feature call
23
- */
24
- mlGeoJsonLayerProps?: Omit<MlGeoJsonLayerProps, 'geojson'>;
25
- };
26
- export type OgcApiFeaturesParamsTypes = {
27
- bbox?: string;
28
- bbox_crs?: string;
29
- limit?: number;
30
- offset?: number;
31
- crs?: string;
32
- datetime?: string;
33
- properties?: string;
34
- sortby?: string;
35
- f?: string;
36
- filter?: string;
37
- lang?: string;
38
- q?: string;
39
- properties_crs?: string;
40
- id?: string;
41
- filter_lang?: string;
42
- filter_crs?: string;
43
- };
44
- declare const MlOgcApiFeatures: (props: MlOgcApiFeaturesProps) => React.JSX.Element;
45
- export default MlOgcApiFeatures;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- export interface MlOrderLayersProps {
3
- /**
4
- * Id of the target MapLibre instance in mapContext
5
- */
6
- mapId?: string;
7
- layerIds: string[];
8
- insertBeforeLayer?: string;
9
- }
10
- /**
11
- * Creates an invisible layer for each entry in props.layerIds with the id `order-{entry}` and a reliable order
12
- *
13
- */
14
- declare const MlOrderLayers: {
15
- (props: MlOrderLayersProps): React.JSX.Element;
16
- defaultProps: {
17
- mapId: undefined;
18
- insertBeforeLayer: undefined;
19
- };
20
- };
21
- export default MlOrderLayers;