@mapcomponents/react-maplibre 1.3.3 → 1.5.1-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.
- package/CHANGELOG.md +163 -38
- package/CODE_OF_CONDUCT.md +70 -70
- package/CONTRIBUTING.md +157 -149
- package/README.md +1 -1
- package/docs_md/anatomy_of_a_mapcomponent.md +34 -37
- package/docs_md/initial_0.gif +0 -0
- package/eslint.config.cjs +3 -0
- package/index.html +30 -0
- package/package.json +192 -224
- package/project.json +21 -0
- package/tsconfig.lib.json +29 -0
- package/vite.config.ts +61 -0
- package/.eslintrc.cjs +0 -33
- package/dist/assets/index.cjs-Iqz0mZaU.css +0 -98
- package/dist/assets/index.esm-Iqz0mZaU.css +0 -98
- package/dist/index.cjs.js +0 -22120
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.esm.js +0 -22000
- package/dist/index.esm.js.map +0 -1
- package/dist/src/components/MapLibreMap/MapLibreMap.d.ts +0 -34
- package/dist/src/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +0 -120
- package/dist/src/components/MlCenterPosition/MlCenterPosition.d.ts +0 -36
- package/dist/src/components/MlClientSearch/MlClientSearch.d.ts +0 -30
- package/dist/src/components/MlClientSearch/lib/SearchContext.d.ts +0 -13
- package/dist/src/components/MlClientSearch/lib/SearchForm.d.ts +0 -2
- package/dist/src/components/MlClientSearch/lib/createGeojsonFeature.d.ts +0 -4
- package/dist/src/components/MlComponentTemplate/MlComponentTemplate.d.ts +0 -18
- package/dist/src/components/MlComponentTemplate/MlComponentTemplate.stories_.d.ts +0 -14
- package/dist/src/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +0 -22
- package/dist/src/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +0 -13
- package/dist/src/components/MlCreatePdfForm/lib/PdfContext.d.ts +0 -8
- package/dist/src/components/MlCreatePdfForm/lib/PdfForm.d.ts +0 -25
- package/dist/src/components/MlCreatePdfForm/lib/PdfPreview.d.ts +0 -26
- package/dist/src/components/MlCreatePdfForm/lib/pdf.templates.d.ts +0 -11
- package/dist/src/components/MlCreatePngButton/MlCreatePngButton.d.ts +0 -22
- package/dist/src/components/MlFeatureEditor/MlFeatureEditor.d.ts +0 -5
- package/dist/src/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +0 -62
- package/dist/src/components/MlFollowGps/MlFollowGps.d.ts +0 -81
- package/dist/src/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +0 -98
- package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +0 -9
- package/dist/src/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +0 -9
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +0 -4
- package/dist/src/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +0 -5
- package/dist/src/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +0 -23
- package/dist/src/components/MlGlobeButton/MlGlobeButton.d.ts +0 -28
- package/dist/src/components/MlGpxViewer/MlGpxViewer.d.ts +0 -31
- package/dist/src/components/MlGpxViewer/util/GeoJsonContext.d.ts +0 -10
- package/dist/src/components/MlGpxViewer/util/GeoJsonProvider.d.ts +0 -5
- package/dist/src/components/MlGpxViewer/util/Metadata.d.ts +0 -7
- package/dist/src/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +0 -11
- package/dist/src/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +0 -4
- package/dist/src/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +0 -39
- package/dist/src/components/MlLayer/MlLayer.d.ts +0 -33
- package/dist/src/components/MlLayerMagnify/MlLayerMagnify.d.ts +0 -33
- package/dist/src/components/MlLayerSwipe/MlLayerSwipe.d.ts +0 -26
- package/dist/src/components/MlLayerSwipe/assets/SwipeIcon.d.ts +0 -10
- package/dist/src/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +0 -29
- package/dist/src/components/MlLayerSwitcher/components/LayerBox.d.ts +0 -10
- package/dist/src/components/MlMarker/MlMarker.d.ts +0 -29
- package/dist/src/components/MlMeasureTool/MlMeasureTool.d.ts +0 -37
- package/dist/src/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +0 -55
- package/dist/src/components/MlNavigationCompass/MlNavigationCompass.d.ts +0 -33
- package/dist/src/components/MlNavigationCompass/assets/CompassBackground.d.ts +0 -9
- package/dist/src/components/MlNavigationCompass/assets/CompassNeedle.d.ts +0 -9
- package/dist/src/components/MlNavigationTools/MlNavigationTools.d.ts +0 -60
- package/dist/src/components/MlOgcApiFeatures/MlOgcApiFeatures.d.ts +0 -45
- package/dist/src/components/MlOrderLayers/MlOrderLayers.d.ts +0 -21
- package/dist/src/components/MlScaleReference/MlScaleReference.d.ts +0 -9
- package/dist/src/components/MlShareMapState/MlShareMapState.d.ts +0 -35
- package/dist/src/components/MlSketchTool/MlSketchTool.d.ts +0 -50
- package/dist/src/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +0 -40
- package/dist/src/components/MlSpatialElevationProfile/util/getElevationData.d.ts +0 -13
- package/dist/src/components/MlTemporalController/MlTemporalController.d.ts +0 -181
- package/dist/src/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +0 -20
- package/dist/src/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +0 -22
- package/dist/src/components/MlTemporalController/utils/paintPicker.d.ts +0 -59
- package/dist/src/components/MlTemporalController/utils/useFilterData.d.ts +0 -14
- package/dist/src/components/MlTerrainLayer/MlTerrainLayer.d.ts +0 -28
- package/dist/src/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +0 -13
- package/dist/src/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +0 -12
- package/dist/src/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +0 -21
- package/dist/src/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +0 -22
- package/dist/src/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +0 -22
- package/dist/src/components/MlWmsLayer/MlWmsLayer.d.ts +0 -58
- package/dist/src/components/MlWmsLoader/MlWmsLoader.d.ts +0 -125
- package/dist/src/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +0 -4
- package/dist/src/components/MlWmsLoader/utils/WMSLinks.d.ts +0 -8
- package/dist/src/contexts/LayerContext.d.ts +0 -59
- package/dist/src/contexts/MapContext.d.ts +0 -26
- package/dist/src/contexts/SimpleDataContext.d.ts +0 -4
- package/dist/src/contexts/SimpleDataProvider.d.ts +0 -12
- package/dist/src/decorators/EmptyMapDecorator.d.ts +0 -4
- package/dist/src/decorators/GeoJsonMapDecorator.d.ts +0 -4
- package/dist/src/decorators/LowZoomDecorator.d.ts +0 -4
- package/dist/src/decorators/MapContextDecorator.d.ts +0 -7
- package/dist/src/decorators/MapContextDecoratorHooks.d.ts +0 -4
- package/dist/src/decorators/MapContextReduxStoreDecorator.d.ts +0 -7
- package/dist/src/decorators/MultiMapContextDecorator.d.ts +0 -4
- package/dist/src/decorators/NoNavToolsDecorator.d.ts +0 -4
- package/dist/src/decorators/ThemeDecorator.d.ts +0 -5
- package/dist/src/hooks/useAddImage/useAddImage.d.ts +0 -20
- package/dist/src/hooks/useAddProtocol/useAddProtocol.d.ts +0 -23
- package/dist/src/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +0 -35
- package/dist/src/hooks/useExportMap/index.d.ts +0 -11
- package/dist/src/hooks/useExportMap/lib.d.ts +0 -52
- package/dist/src/hooks/useFeatureEditor/useFeatureEditor.d.ts +0 -46
- package/dist/src/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -116
- package/dist/src/hooks/useFitLayerBounds.d.ts +0 -8
- package/dist/src/hooks/useGpx/useGpx.d.ts +0 -26
- package/dist/src/hooks/useLayer.d.ts +0 -36
- package/dist/src/hooks/useLayerContext.d.ts +0 -2
- package/dist/src/hooks/useLayerFilter/useLayerFilter.d.ts +0 -8
- package/dist/src/hooks/useLayerHoverPopup/LayerHoverPopup.d.ts +0 -24
- package/dist/src/hooks/useMap.d.ts +0 -14
- package/dist/src/hooks/useMapState.d.ts +0 -37
- package/dist/src/hooks/useSource.d.ts +0 -17
- package/dist/src/hooks/useWms.d.ts +0 -26
- package/dist/src/index.d.ts +0 -126
- package/dist/src/omt_styles/bright.d.ts +0 -2495
- package/dist/src/omt_styles/config.d.ts +0 -7
- package/dist/src/omt_styles/gruvbox.d.ts +0 -2420
- package/dist/src/omt_styles/medieval_kingdom.d.ts +0 -2420
- package/dist/src/omt_styles/monokai.d.ts +0 -2420
- package/dist/src/omt_styles/oceanic_next.d.ts +0 -2420
- package/dist/src/omt_styles/solarized.d.ts +0 -2420
- package/dist/src/protocol_handlers/csv.d.ts +0 -8
- package/dist/src/protocol_handlers/mbtiles.d.ts +0 -74
- package/dist/src/protocol_handlers/osm.d.ts +0 -10
- package/dist/src/protocol_handlers/topojson.d.ts +0 -9
- package/dist/src/protocol_handlers/utils/getProtocolData.d.ts +0 -1
- package/dist/src/protocol_handlers/utils/protocolPathParser.d.ts +0 -7
- package/dist/src/protocol_handlers/xml.d.ts +0 -10
- package/dist/src/stores/map.store.d.ts +0 -105
- package/dist/src/ui_components/AddLayerButton/AddLayerButton.d.ts +0 -17
- package/dist/src/ui_components/AddLayerButton/AddLayerPopup.d.ts +0 -15
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +0 -8
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +0 -13
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +0 -10
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +0 -6
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +0 -7
- package/dist/src/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +0 -6
- package/dist/src/ui_components/ColorPicker/ColorPicker.d.ts +0 -15
- package/dist/src/ui_components/ColorPicker/transformers.d.ts +0 -10
- package/dist/src/ui_components/ConfirmDialog.d.ts +0 -16
- package/dist/src/ui_components/DemoDescriptions.d.ts +0 -12
- package/dist/src/ui_components/Dropzone.d.ts +0 -6
- package/dist/src/ui_components/ImageLoader.d.ts +0 -10
- package/dist/src/ui_components/LayerList/LayerList.d.ts +0 -7
- package/dist/src/ui_components/LayerList/LayerListFolder.d.ts +0 -9
- package/dist/src/ui_components/LayerList/LayerListItem.d.ts +0 -26
- package/dist/src/ui_components/LayerList/LayerListItemFactory.d.ts +0 -18
- package/dist/src/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +0 -19
- package/dist/src/ui_components/LayerList/util/LayerPropertyForm.d.ts +0 -10
- package/dist/src/ui_components/LayerList/util/SortableContainer.d.ts +0 -7
- package/dist/src/ui_components/LayerList/util/input/ColorPicker.d.ts +0 -10
- package/dist/src/ui_components/LayerTree/LayerOnMap.d.ts +0 -7
- package/dist/src/ui_components/LayerTree/LayerTree.d.ts +0 -6
- package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +0 -18
- package/dist/src/ui_components/LayerTree/util/LayerPropertyForm.d.ts +0 -9
- package/dist/src/ui_components/LayerTree/util/input/ColorPicker.d.ts +0 -7
- package/dist/src/ui_components/LoadingOverlayContext.d.ts +0 -4
- package/dist/src/ui_components/MapcomponentsTheme.d.ts +0 -36
- package/dist/src/ui_components/SelectStyleButton/SelectStyleButton.d.ts +0 -20
- package/dist/src/ui_components/SelectStyleButton/SelectStylePopup.d.ts +0 -18
- package/dist/src/ui_components/Sidebar.d.ts +0 -13
- package/dist/src/ui_components/SpeedDial/SpeedDial.d.ts +0 -14
- package/dist/src/ui_components/TopToolbar.d.ts +0 -9
- package/dist/src/ui_components/UploadButton.d.ts +0 -8
- package/dist/src/util/BubbleForInstructions.d.ts +0 -16
- package/dist/src/util/Instructions.d.ts +0 -14
- package/eslint.config.mjs +0 -73
- package/rollup.config.mjs +0 -62
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { MapOptions as MapOptionsType } from 'maplibre-gl';
|
|
3
|
-
import 'maplibre-gl/dist/maplibre-gl.css';
|
|
4
|
-
export type MapLibreMapProps = {
|
|
5
|
-
/**
|
|
6
|
-
* Id of the MapLibreGl(Wrapper) instance in mapContext
|
|
7
|
-
*/
|
|
8
|
-
mapId?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Config object that is passed to the MapLibreGl constructor as first parameter.
|
|
11
|
-
* See https://maplibre.org/maplibre-gl-js-docs/api/map/ for a formal documentation of al
|
|
12
|
-
* available properties.
|
|
13
|
-
*/
|
|
14
|
-
options?: Partial<MapOptionsType>;
|
|
15
|
-
/**
|
|
16
|
-
* css style definition passed to the map container DOM element
|
|
17
|
-
*/
|
|
18
|
-
style?: object;
|
|
19
|
-
};
|
|
20
|
-
type MapLibreMapComponent = FC<MapLibreMapProps> & {
|
|
21
|
-
defaultProps: MapLibreMapProps;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Creates a MapLibreGlWrapper instance and registers it in MapContext
|
|
25
|
-
* after the MapLibre-gl load event has fired.
|
|
26
|
-
*
|
|
27
|
-
* MapLibreMap returns the html node that will be used by MapLibre-gl to render the map.
|
|
28
|
-
* This Component must be kept unaware of any related components that interact with the MapLibre-gl
|
|
29
|
-
* instance.
|
|
30
|
-
*
|
|
31
|
-
* @category Map components
|
|
32
|
-
*/
|
|
33
|
-
declare const MapLibreMap: MapLibreMapComponent;
|
|
34
|
-
export default MapLibreMap;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import { Map, IControl, MapOptions as MapOptionsType, MapEventType, MapLayerEventType, StyleImageInterface, LayerSpecification, CustomLayerInterface, SourceSpecification, ControlPosition, StyleImageMetadata } from 'maplibre-gl';
|
|
2
|
-
import { Map as MapType, Style } from 'maplibre-gl';
|
|
3
|
-
type WrapperEventArgArray = [MapLibreGlWrapperEventName, MapLibreGlWrapperEventHandlerType];
|
|
4
|
-
type EventArgArray = [
|
|
5
|
-
keyof MapLayerEventType | keyof MapEventType,
|
|
6
|
-
string | ((arg0: unknown) => void),
|
|
7
|
-
((arg0: unknown) => void)?
|
|
8
|
-
];
|
|
9
|
-
type LayerState = {
|
|
10
|
-
id: string;
|
|
11
|
-
type: string;
|
|
12
|
-
visible: boolean;
|
|
13
|
-
baseLayer: boolean;
|
|
14
|
-
};
|
|
15
|
-
type ViewportState = {
|
|
16
|
-
center: {
|
|
17
|
-
lng: number;
|
|
18
|
-
lat: number;
|
|
19
|
-
};
|
|
20
|
-
zoom: number;
|
|
21
|
-
bearing: number;
|
|
22
|
-
pitch: number;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* Creates a MapLibre-gl-js instance and offers all of the native MapLibre functions and properties as well as additional functionality such as element registration & cleanup and more events.
|
|
26
|
-
*
|
|
27
|
-
* @param {object} props
|
|
28
|
-
*
|
|
29
|
-
* @class
|
|
30
|
-
*/
|
|
31
|
-
interface MapLibreGlWrapper extends MapType {
|
|
32
|
-
addImage: (id: string, image: HTMLImageElement | ImageBitmap | ImageData | {
|
|
33
|
-
width: number;
|
|
34
|
-
height: number;
|
|
35
|
-
data: Uint8Array | Uint8ClampedArray;
|
|
36
|
-
} | StyleImageInterface, key?: Partial<StyleImageMetadata> | string | undefined, componentId?: string | undefined) => this;
|
|
37
|
-
addLayer: (layer: (LayerSpecification & {
|
|
38
|
-
source?: string | SourceSpecification | undefined;
|
|
39
|
-
}) | (CustomLayerInterface & {
|
|
40
|
-
source?: string | SourceSpecification | undefined;
|
|
41
|
-
}), beforeId?: string | undefined, componentId?: string | undefined) => this;
|
|
42
|
-
cancelled: boolean;
|
|
43
|
-
}
|
|
44
|
-
interface MapLibreGlWrapperEventHandlers {
|
|
45
|
-
layerchange: {
|
|
46
|
-
handler: (ev: unknown) => void;
|
|
47
|
-
options?: object | string;
|
|
48
|
-
}[];
|
|
49
|
-
viewportchange: {
|
|
50
|
-
handler: (ev: unknown) => void;
|
|
51
|
-
options?: object | string;
|
|
52
|
-
}[];
|
|
53
|
-
addsource: {
|
|
54
|
-
handler: (ev: unknown, wrapper?: MapLibreGlWrapper, data?: {
|
|
55
|
-
[source_id: string]: string;
|
|
56
|
-
}) => void;
|
|
57
|
-
}[];
|
|
58
|
-
addlayer: {
|
|
59
|
-
handler: (ev: unknown) => void;
|
|
60
|
-
options?: object | string;
|
|
61
|
-
}[];
|
|
62
|
-
}
|
|
63
|
-
export type MapLibreGlWrapperEventHandlerType = MapLibreGlWrapperEventHandlers['layerchange'][number]['handler'] | MapLibreGlWrapperEventHandlers['viewportchange'][number]['handler'] | MapLibreGlWrapperEventHandlers['addsource'][number]['handler'] | MapLibreGlWrapperEventHandlers['addlayer'][number]['handler'];
|
|
64
|
-
export type MapLibreGlEventName = keyof MapLayerEventType | keyof MapEventType | string;
|
|
65
|
-
export type MapLibreGlWrapperEventName = keyof MapLibreGlWrapperEventHandlers;
|
|
66
|
-
declare class MapLibreGlWrapper {
|
|
67
|
-
[key: string]: any;
|
|
68
|
-
registeredElements: {
|
|
69
|
-
[key: string]: {
|
|
70
|
-
layers: [string?];
|
|
71
|
-
sources: [string?];
|
|
72
|
-
images: [string?];
|
|
73
|
-
controls: [(IControl | unknown)?];
|
|
74
|
-
events: [EventArgArray?];
|
|
75
|
-
wrapperEvents: [WrapperEventArgArray?];
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
baseLayers: [string?];
|
|
79
|
-
firstSymbolLayer: string | undefined;
|
|
80
|
-
eventHandlers: MapLibreGlWrapperEventHandlers;
|
|
81
|
-
wrapper: {
|
|
82
|
-
on: (eventName: MapLibreGlWrapperEventName, handler: MapLibreGlWrapperEventHandlerType, options?: object | string, componentId?: string) => void;
|
|
83
|
-
off: (type: string, handler: MapLibreGlWrapperEventHandlerType) => void;
|
|
84
|
-
fire: (eventName: string, context?: unknown) => void;
|
|
85
|
-
layerState: LayerState[];
|
|
86
|
-
layerStateString: string;
|
|
87
|
-
oldLayerStateStrings: object;
|
|
88
|
-
buildLayerObject: (layer: ReturnType<Style['getLayer']>) => LayerState | undefined;
|
|
89
|
-
buildLayerObjects: () => LayerState[];
|
|
90
|
-
refreshLayerState: () => void;
|
|
91
|
-
viewportState: ViewportState;
|
|
92
|
-
viewportStateString: string;
|
|
93
|
-
oldViewportStateString: string;
|
|
94
|
-
getViewport: () => {
|
|
95
|
-
center: {
|
|
96
|
-
lng: number;
|
|
97
|
-
lat: number;
|
|
98
|
-
};
|
|
99
|
-
zoom: number;
|
|
100
|
-
bearing: number;
|
|
101
|
-
pitch: number;
|
|
102
|
-
};
|
|
103
|
-
refreshViewport: () => void;
|
|
104
|
-
};
|
|
105
|
-
initRegisteredElements: (componentId: string, force?: boolean | undefined) => void;
|
|
106
|
-
addNativeMaplibreFunctionsAndProps: () => void;
|
|
107
|
-
map: MapType;
|
|
108
|
-
style: Style;
|
|
109
|
-
styleJson: object;
|
|
110
|
-
addSource: (id: string, source: SourceSpecification, componentId?: string | undefined) => this;
|
|
111
|
-
addControl: (control: IControl | unknown, position?: ControlPosition | undefined, componentId?: string | undefined) => this;
|
|
112
|
-
on: (type: MapLibreGlEventName, layerId: string | ((ev: unknown) => void), handler?: ((ev: MapEventType & unknown) => Map | void) | string, componentId?: string | undefined) => this;
|
|
113
|
-
cleanup: (componentId: string) => void;
|
|
114
|
-
constructor(props: {
|
|
115
|
-
mapOptions: MapOptionsType;
|
|
116
|
-
onReady: (map: MapType, context: unknown) => void;
|
|
117
|
-
});
|
|
118
|
-
}
|
|
119
|
-
export default MapLibreGlWrapper;
|
|
120
|
-
export type { LayerState, ViewportState };
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SxProps, Theme } from '@mui/material';
|
|
3
|
-
export interface MlCenterPositionProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the target MapLibre instance in mapContext
|
|
6
|
-
*/
|
|
7
|
-
mapId?: string;
|
|
8
|
-
/**
|
|
9
|
-
* Id of an existing layer in the mapLibre instance to help specify the layer order
|
|
10
|
-
* This layer will be visually beneath the layer with the "insertBeforeLayer" id.
|
|
11
|
-
*/
|
|
12
|
-
insertBeforeLayer?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Active button font color
|
|
15
|
-
*/
|
|
16
|
-
onColor?: string;
|
|
17
|
-
/**
|
|
18
|
-
* Inactive button font color
|
|
19
|
-
*/
|
|
20
|
-
offColor?: string;
|
|
21
|
-
/**
|
|
22
|
-
* CSS style object that is applied to the button component
|
|
23
|
-
*/
|
|
24
|
-
style?: SxProps<Theme> | undefined;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* Component template
|
|
28
|
-
*
|
|
29
|
-
*/
|
|
30
|
-
declare const MlCenterPosition: {
|
|
31
|
-
(props: MlCenterPositionProps): React.JSX.Element;
|
|
32
|
-
defaultProps: {
|
|
33
|
-
mapId: undefined;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export default MlCenterPosition;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SearchContextInterface } from './lib/searchContext';
|
|
3
|
-
interface MlClientSearchProps {
|
|
4
|
-
/**
|
|
5
|
-
* Search Engine: http://elasticlunr.com/
|
|
6
|
-
*/
|
|
7
|
-
searchIndex: SearchContextInterface['searchIndex'];
|
|
8
|
-
/**
|
|
9
|
-
* Docs: http://elasticlunr.com/docs/configuration.js.html
|
|
10
|
-
*/
|
|
11
|
-
fields: SearchContextInterface['fields'];
|
|
12
|
-
/**
|
|
13
|
-
* Docs: https://mui.com/material-ui/api/autocomplete/
|
|
14
|
-
*/
|
|
15
|
-
renderOption?: SearchContextInterface['renderOption'];
|
|
16
|
-
/**
|
|
17
|
-
* Label search field
|
|
18
|
-
*/
|
|
19
|
-
searchFieldLabel?: SearchContextInterface['searchFieldLabel'];
|
|
20
|
-
}
|
|
21
|
-
export type { MlClientSearchProps };
|
|
22
|
-
/**
|
|
23
|
-
* Component template
|
|
24
|
-
*
|
|
25
|
-
*/
|
|
26
|
-
declare const MlClientSearch: {
|
|
27
|
-
({ searchIndex, fields, renderOption, searchFieldLabel, }: MlClientSearchProps): React.JSX.Element;
|
|
28
|
-
defaultProps: {};
|
|
29
|
-
};
|
|
30
|
-
export default MlClientSearch;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SearchContextInterface } from './searchContext.js';
|
|
3
|
-
interface SearchContextProviderProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
searchIndex: SearchContextInterface['searchIndex'];
|
|
6
|
-
fields: SearchContextInterface['fields'];
|
|
7
|
-
renderOption?: SearchContextInterface['renderOption'];
|
|
8
|
-
searchFieldLabel?: SearchContextInterface['searchFieldLabel'];
|
|
9
|
-
}
|
|
10
|
-
declare const SearchContext: React.Context<SearchContextInterface>;
|
|
11
|
-
declare const SearchContextProvider: React.FC<SearchContextProviderProps>;
|
|
12
|
-
export { SearchContextProvider };
|
|
13
|
-
export default SearchContext;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Point, MultiPoint, LineString, MultiLineString, Polygon, Feature } from 'geojson';
|
|
2
|
-
type ExcludedGeometryCollection = Point | MultiPoint | LineString | MultiLineString | Polygon;
|
|
3
|
-
export declare function createGeoJSONFeature(coordinates: ExcludedGeometryCollection['coordinates']): Feature<ExcludedGeometryCollection>;
|
|
4
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
export interface MlComponentTemplateProps {
|
|
3
|
-
/**
|
|
4
|
-
* Id of the target MapLibre instance in mapContext
|
|
5
|
-
*/
|
|
6
|
-
mapId?: string;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Component description
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
|
-
declare const MlComponentTemplate: {
|
|
13
|
-
(props: MlComponentTemplateProps): React.JSX.Element;
|
|
14
|
-
defaultProps: {
|
|
15
|
-
mapId: undefined;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default MlComponentTemplate;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
declare const storyoptions: {
|
|
3
|
-
title: string;
|
|
4
|
-
component: {
|
|
5
|
-
(props: import("./MlComponentTemplate").MlComponentTemplateProps): React.JSX.Element;
|
|
6
|
-
defaultProps: {
|
|
7
|
-
mapId: undefined;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
argTypes: {};
|
|
11
|
-
decorators: import("@storybook/react-webpack5").Decorator[];
|
|
12
|
-
};
|
|
13
|
-
export default storyoptions;
|
|
14
|
-
export declare const ExampleConfig: any;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { createExportOptions } from 'src/hooks/useExportMap/lib';
|
|
3
|
-
export interface MlCreatePdfButtonProps {
|
|
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 PDF version of the current map view (dimensions adjusted to fit Din A4 Paper).
|
|
15
|
-
*/
|
|
16
|
-
declare const MlCreatePdfButton: {
|
|
17
|
-
(props: MlCreatePdfButtonProps): React.JSX.Element;
|
|
18
|
-
defaultProps: {
|
|
19
|
-
mapId: undefined;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default MlCreatePdfButton;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PdfFormProps } from './lib/PdfForm';
|
|
3
|
-
/**
|
|
4
|
-
* Create PDF Form Component
|
|
5
|
-
*
|
|
6
|
-
*/
|
|
7
|
-
declare const MlCreatePdfForm: {
|
|
8
|
-
(props: PdfFormProps): React.JSX.Element;
|
|
9
|
-
defaultProps: {
|
|
10
|
-
mapId: undefined;
|
|
11
|
-
};
|
|
12
|
-
};
|
|
13
|
-
export default MlCreatePdfForm;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PdfContextInterface } from './pdfContext';
|
|
3
|
-
declare const PdfContext: React.Context<PdfContextInterface>;
|
|
4
|
-
declare const PdfContextProvider: ({ children }: {
|
|
5
|
-
children: React.ReactNode;
|
|
6
|
-
}) => React.JSX.Element;
|
|
7
|
-
export { PdfContextProvider };
|
|
8
|
-
export default PdfContext;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SxProps } from '@mui/material';
|
|
3
|
-
import { createPdfResolverParams } from '../../../hooks/useExportMap/lib';
|
|
4
|
-
export interface PdfFormProps {
|
|
5
|
-
/**
|
|
6
|
-
* Id of the target MapLibre instance in mapContext
|
|
7
|
-
*/
|
|
8
|
-
mapId?: string;
|
|
9
|
-
/**
|
|
10
|
-
* Function that will be called before the PDF is created.
|
|
11
|
-
* Allowing to access and manipulate the jspdf instance before the PDF is created.
|
|
12
|
-
*/
|
|
13
|
-
onCreatePdf?: (options: createPdfResolverParams) => createPdfResolverParams;
|
|
14
|
-
/**
|
|
15
|
-
* sx props that will be applied to the form control components
|
|
16
|
-
*/
|
|
17
|
-
formControlStyles?: SxProps;
|
|
18
|
-
/**
|
|
19
|
-
* Define additional form fields that will be added to the bottom of the create-PDF form.
|
|
20
|
-
* Values of form elements added this way are accessible inside the function passed to the onCreatePdf property using options.formData.get('{form_el_name}').
|
|
21
|
-
* Make sure all form elements added this way have a name property defined to be able to access the value when rendering the PDF.
|
|
22
|
-
*/
|
|
23
|
-
additionalFields?: React.ReactNode;
|
|
24
|
-
}
|
|
25
|
-
export default function PdfForm(props: PdfFormProps): React.JSX.Element;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { PdfPreviewOptions } from './pdfContext';
|
|
3
|
-
import { Feature } from 'geojson';
|
|
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,22 +0,0 @@
|
|
|
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,62 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Feature, FeatureCollection } from 'geojson';
|
|
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
|
|
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) => React.JSX.Element;
|
|
98
|
-
export default MlGeoJsonLayer;
|