@mapcomponents/react-maplibre 1.0.7 → 1.0.9
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 +16 -0
- package/dist/index.cjs.js +688 -52
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +682 -51
- package/dist/index.esm.js.map +1 -1
- package/dist/src/components/MlOgcApiFeatures/MlOgcApiFeatures.d.ts +45 -0
- package/dist/{components → src/components}/MlVectorTileLayer/MlVectorTileLayer.d.ts +4 -1
- package/dist/src/decorators/MapContextReduxStoreDecorator.d.ts +7 -0
- package/dist/{index.d.ts → src/index.d.ts} +38 -0
- package/dist/src/stores/map.store.d.ts +105 -0
- package/dist/{ui_components → src/ui_components}/ColorPicker/ColorPicker.d.ts +0 -2
- package/dist/{ui_components → src/ui_components}/LayerList/util/LayerListItemVectorLayer.d.ts +2 -4
- package/dist/src/ui_components/LayerTree/LayerOnMap.d.ts +7 -0
- package/dist/src/ui_components/LayerTree/LayerTree.d.ts +6 -0
- package/dist/src/ui_components/LayerTree/LayerTreeListItem.d.ts +18 -0
- package/dist/src/ui_components/LayerTree/util/LayerPropertyForm.d.ts +9 -0
- package/dist/src/ui_components/LayerTree/util/input/ColorPicker.d.ts +7 -0
- package/package.json +10 -6
- /package/dist/{components → src/components}/MapLibreMap/MapLibreMap.d.ts +0 -0
- /package/dist/{components → src/components}/MapLibreMap/lib/MapLibreGlWrapper.d.ts +0 -0
- /package/dist/{components → src/components}/MlCenterPosition/MlCenterPosition.d.ts +0 -0
- /package/dist/{components → src/components}/MlClientSearch/MlClientSearch.d.ts +0 -0
- /package/dist/{components → src/components}/MlClientSearch/lib/SearchContext.d.ts +0 -0
- /package/dist/{components → src/components}/MlClientSearch/lib/SearchForm.d.ts +0 -0
- /package/dist/{components → src/components}/MlClientSearch/lib/createGeojsonFeature.d.ts +0 -0
- /package/dist/{components → src/components}/MlComponentTemplate/MlComponentTemplate.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfButton/MlCreatePdfButton.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfForm/MlCreatePdfForm.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfForm/lib/PdfContext.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfForm/lib/PdfForm.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfForm/lib/PdfPreview.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePdfForm/lib/pdf.templates.d.ts +0 -0
- /package/dist/{components → src/components}/MlCreatePngButton/MlCreatePngButton.d.ts +0 -0
- /package/dist/{components → src/components}/MlFeatureEditor/MlFeatureEditor.d.ts +0 -0
- /package/dist/{components → src/components}/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlFollowGps/MlFollowGps.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +0 -0
- /package/dist/{components → src/components}/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/MlGpxViewer.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/util/GeoJsonContext.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/util/GeoJsonProvider.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/util/Metadata.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/util/MlGpxDemoLoader.d.ts +0 -0
- /package/dist/{components → src/components}/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +0 -0
- /package/dist/{components → src/components}/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlLayer/MlLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlLayerMagnify/MlLayerMagnify.d.ts +0 -0
- /package/dist/{components → src/components}/MlLayerSwipe/MlLayerSwipe.d.ts +0 -0
- /package/dist/{components → src/components}/MlLayerSwitcher/MlLayerSwitcher.d.ts +0 -0
- /package/dist/{components → src/components}/MlLayerSwitcher/components/LayerBox.d.ts +0 -0
- /package/dist/{components → src/components}/MlMarker/MlMarker.d.ts +0 -0
- /package/dist/{components → src/components}/MlMeasureTool/MlMeasureTool.d.ts +0 -0
- /package/dist/{components → src/components}/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +0 -0
- /package/dist/{components → src/components}/MlNavigationCompass/MlNavigationCompass.d.ts +0 -0
- /package/dist/{components → src/components}/MlNavigationTools/MlNavigationTools.d.ts +0 -0
- /package/dist/{components → src/components}/MlOrderLayers/MlOrderLayers.d.ts +0 -0
- /package/dist/{components → src/components}/MlScaleReference/MlScaleReference.d.ts +0 -0
- /package/dist/{components → src/components}/MlShareMapState/MlShareMapState.d.ts +0 -0
- /package/dist/{components → src/components}/MlSketchTool/MlSketchTool.d.ts +0 -0
- /package/dist/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +0 -0
- /package/dist/{components → src/components}/MlSpatialElevationProfile/util/getElevationData.d.ts +0 -0
- /package/dist/{components → src/components}/MlTemporalController/MlTemporalController.d.ts +0 -0
- /package/dist/{components → src/components}/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +0 -0
- /package/dist/{components → src/components}/MlTemporalController/utils/TemporalControllerPlayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlTemporalController/utils/paintPicker.d.ts +0 -0
- /package/dist/{components → src/components}/MlTemporalController/utils/useFilterData.d.ts +0 -0
- /package/dist/{components → src/components}/MlTerrainLayer/MlTerrainLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlThreeJsLayer/MlThreeJsLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlUseMapDebugger/MlUseMapDebugger.d.ts +0 -0
- /package/dist/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +0 -0
- /package/dist/{components → src/components}/MlWmsLayer/MlWmsLayer.d.ts +0 -0
- /package/dist/{components → src/components}/MlWmsLoader/MlWmsLoader.d.ts +0 -0
- /package/dist/{components → src/components}/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +0 -0
- /package/dist/{components → src/components}/MlWmsLoader/utils/WMSLinks.d.ts +0 -0
- /package/dist/{contexts → src/contexts}/LayerContext.d.ts +0 -0
- /package/dist/{contexts → src/contexts}/MapContext.d.ts +0 -0
- /package/dist/{contexts → src/contexts}/SimpleDataContext.d.ts +0 -0
- /package/dist/{contexts → src/contexts}/SimpleDataProvider.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/EmptyMapDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/GeoJsonMapDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/LowZoomDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/MapContextDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/MapContextDecoratorHooks.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/MultiMapContextDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/NoNavToolsDecorator.d.ts +0 -0
- /package/dist/{decorators → src/decorators}/ThemeDecorator.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useAddImage/useAddImage.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useAddProtocol/useAddProtocol.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useCameraFollowPath/useCameraFollowPath.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useExportMap/index.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useExportMap/lib.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useFeatureEditor/useFeatureEditor.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useFeatureEditor/utils/FeatureEditorStyle.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useFitLayerBounds.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useGpx/useGpx.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useLayer.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useLayerContext.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useLayerFilter/useLayerFilter.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useLayerHoverPopup/LayerHoverPopup.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMap.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useMapState.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useSource.d.ts +0 -0
- /package/dist/{hooks → src/hooks}/useWms.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/bright.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/config.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/gruvbox.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/medieval_kingdom.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/monokai.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/oceanic_next.d.ts +0 -0
- /package/dist/{omt_styles → src/omt_styles}/solarized.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/csv.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/mbtiles.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/osm.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/topojson.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/utils/getProtocolData.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/utils/protocolPathParser.d.ts +0 -0
- /package/dist/{protocol_handlers → src/protocol_handlers}/xml.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/AddLayerButton.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/AddLayerPopup.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/ColorPicker/transformers.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/ConfirmDialog.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/DemoDescriptions.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/Dropzone.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/ImageLoader.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/LayerList.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/LayerListFolder.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/LayerListItem.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/LayerListItemFactory.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/util/LayerPropertyForm.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/util/SortableContainer.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LayerList/util/input/ColorPicker.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/LoadingOverlayContext.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/MapcomponentsTheme.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/SelectStyleButton/SelectStyleButton.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/SelectStyleButton/SelectStylePopup.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/Sidebar.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/SpeedDial/SpeedDial.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/TopToolbar.d.ts +0 -0
- /package/dist/{ui_components → src/ui_components}/UploadButton.d.ts +0 -0
- /package/dist/{util → src/util}/BubbleForInstructions.d.ts +0 -0
- /package/dist/{util → src/util}/Instructions.d.ts +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
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,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { LayerSpecification } from 'maplibre-gl';
|
|
3
3
|
import { VectorSourceSpecification } from 'maplibre-gl';
|
|
4
|
+
export type ExtendedLayerSpecification = LayerSpecification & {
|
|
5
|
+
masterVisible?: boolean;
|
|
6
|
+
};
|
|
4
7
|
export type MlVectorTileLayerProps = {
|
|
5
8
|
mapId?: string;
|
|
6
9
|
insertBeforeLayer?: string;
|
|
7
10
|
layerId?: string;
|
|
8
11
|
sourceOptions?: VectorSourceSpecification;
|
|
9
12
|
url?: string;
|
|
10
|
-
layers:
|
|
13
|
+
layers: ExtendedLayerSpecification[];
|
|
11
14
|
};
|
|
12
15
|
/**
|
|
13
16
|
* Adds a vector-tile source and 0...n vector-tile-layers to the MapLibre instance referenced by
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MapLibreMapProps } from '../components/MapLibreMap/MapLibreMap';
|
|
2
|
+
import './style.css';
|
|
3
|
+
import { Decorator } from '@storybook/react';
|
|
4
|
+
declare const makeMapContextDecorators: (options: MapLibreMapProps['options']) => Decorator[];
|
|
5
|
+
declare const _default: Decorator[];
|
|
6
|
+
export default _default;
|
|
7
|
+
export { makeMapContextDecorators };
|
|
@@ -28,6 +28,7 @@ export { default as GeoJsonContext } from './components/MlGpxViewer/util/GeoJson
|
|
|
28
28
|
export { default as MlShareMapState } from './components/MlShareMapState/MlShareMapState';
|
|
29
29
|
export { default as MlSpatialElevationProfile } from './components/MlSpatialElevationProfile/MlSpatialElevationProfile';
|
|
30
30
|
export { default as MlVectorTileLayer } from './components/MlVectorTileLayer/MlVectorTileLayer';
|
|
31
|
+
export { default as MlOgcApiFeatures } from './components/MlOgcApiFeatures/MlOgcApiFeatures';
|
|
31
32
|
export { default as MlWmsFeatureInfoPopup } from './components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup';
|
|
32
33
|
export { default as MlWmsLayer } from './components/MlWmsLayer/MlWmsLayer';
|
|
33
34
|
export { default as MlWmsLoader } from './components/MlWmsLoader/MlWmsLoader';
|
|
@@ -81,8 +82,45 @@ export { default as SelectStyleButton } from './ui_components/SelectStyleButton/
|
|
|
81
82
|
export { default as SelectStylePopup } from './ui_components/SelectStyleButton/SelectStylePopup';
|
|
82
83
|
export { default as ConfirmDialog } from './ui_components/ConfirmDialog';
|
|
83
84
|
export { default as SpeedDial } from './ui_components/SpeedDial/SpeedDial';
|
|
85
|
+
export { default as LayerTree } from './ui_components/LayerTree/LayerTree';
|
|
86
|
+
export { default as LayerOnMap } from './ui_components/LayerTree/LayerOnMap';
|
|
87
|
+
export { default as LayerTreeListItem } from './ui_components/LayerTree/LayerTreeListItem';
|
|
84
88
|
export { default as GruvboxStyle } from './omt_styles/gruvbox';
|
|
85
89
|
export { default as MedievalKingdomStyle } from './omt_styles/medieval_kingdom';
|
|
86
90
|
export { default as MonokaiStyle } from './omt_styles/monokai';
|
|
87
91
|
export { default as OceanicNextStyle } from './omt_styles/oceanic_next';
|
|
88
92
|
export { default as SolarizedStyle } from './omt_styles/solarized';
|
|
93
|
+
declare const MapStore: {
|
|
94
|
+
store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
95
|
+
mapConfig: import("./stores/map.store").MapState;
|
|
96
|
+
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
97
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
98
|
+
mapConfig: import("./stores/map.store").MapState;
|
|
99
|
+
}, undefined, import("redux").UnknownAction>;
|
|
100
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
101
|
+
setMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
102
|
+
key: string;
|
|
103
|
+
mapConfig: import("./stores/map.store").MapConfig;
|
|
104
|
+
}, "mapConfig/setMapConfig">;
|
|
105
|
+
removeMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
106
|
+
key: string;
|
|
107
|
+
}, "mapConfig/removeMapConfig">;
|
|
108
|
+
setLayerInMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
109
|
+
mapConfigKey: string;
|
|
110
|
+
layer: import("./stores/map.store").LayerConfig;
|
|
111
|
+
}, "mapConfig/setLayerInMapConfig">;
|
|
112
|
+
removeLayerFromMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
113
|
+
mapConfigKey: string;
|
|
114
|
+
layerUuid: string;
|
|
115
|
+
}, "mapConfig/removeLayerFromMapConfig">;
|
|
116
|
+
updateLayerOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
117
|
+
mapConfigKey: string;
|
|
118
|
+
newOrder: import("./stores/map.store").LayerOrderItem[];
|
|
119
|
+
}, "mapConfig/updateLayerOrder">;
|
|
120
|
+
setMasterVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
121
|
+
mapConfigKey: string;
|
|
122
|
+
layerId: string;
|
|
123
|
+
masterVisible: boolean;
|
|
124
|
+
}, "mapConfig/setMasterVisible">;
|
|
125
|
+
};
|
|
126
|
+
export { MapStore };
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { MlGeoJsonLayerProps } from 'src/components/MlGeoJsonLayer/MlGeoJsonLayer';
|
|
2
|
+
import { MlVectorTileLayerProps } from 'src/components/MlVectorTileLayer/MlVectorTileLayer';
|
|
3
|
+
import { Layer } from 'wms-capabilities';
|
|
4
|
+
import { MlWmsLayerProps } from '../components/MlWmsLayer/MlWmsLayer';
|
|
5
|
+
export interface wmsLoaderConfigProps {
|
|
6
|
+
getFeatureInfoUrl: string;
|
|
7
|
+
layers: Layer[];
|
|
8
|
+
name: string;
|
|
9
|
+
open: boolean;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
wmsUrl: string;
|
|
12
|
+
}
|
|
13
|
+
export interface wmsConfig {
|
|
14
|
+
featureInfoActive?: boolean;
|
|
15
|
+
config?: wmsLoaderConfigProps;
|
|
16
|
+
url: string;
|
|
17
|
+
}
|
|
18
|
+
export type WmsLayerConfig = {
|
|
19
|
+
type: 'wms';
|
|
20
|
+
uuid: string;
|
|
21
|
+
name?: string;
|
|
22
|
+
id?: string;
|
|
23
|
+
config?: MlWmsLayerProps;
|
|
24
|
+
masterVisible?: boolean;
|
|
25
|
+
};
|
|
26
|
+
export type GeojsonLayerConfig = {
|
|
27
|
+
type: 'geojson';
|
|
28
|
+
uuid: string;
|
|
29
|
+
name?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
config: MlGeoJsonLayerProps;
|
|
32
|
+
masterVisible?: boolean;
|
|
33
|
+
configurable?: boolean;
|
|
34
|
+
};
|
|
35
|
+
export type VtLayerConfig = {
|
|
36
|
+
type: 'vt';
|
|
37
|
+
uuid: string;
|
|
38
|
+
name?: string;
|
|
39
|
+
id?: string;
|
|
40
|
+
config: MlVectorTileLayerProps;
|
|
41
|
+
visible?: boolean;
|
|
42
|
+
masterVisible?: boolean;
|
|
43
|
+
};
|
|
44
|
+
export type FolderLayerConfig = {
|
|
45
|
+
type: 'folder';
|
|
46
|
+
uuid: string;
|
|
47
|
+
name?: string;
|
|
48
|
+
visible?: boolean;
|
|
49
|
+
masterVisible?: boolean;
|
|
50
|
+
id?: string;
|
|
51
|
+
config?: undefined;
|
|
52
|
+
};
|
|
53
|
+
export type LayerConfig = WmsLayerConfig | GeojsonLayerConfig | VtLayerConfig | FolderLayerConfig;
|
|
54
|
+
export interface MapProps {
|
|
55
|
+
center: [number, number];
|
|
56
|
+
zoom: number;
|
|
57
|
+
}
|
|
58
|
+
export interface LayerOrderItem {
|
|
59
|
+
uuid: string;
|
|
60
|
+
layers?: LayerOrderItem[];
|
|
61
|
+
}
|
|
62
|
+
export interface MapConfig {
|
|
63
|
+
name: string;
|
|
64
|
+
mapProps: MapProps;
|
|
65
|
+
layers: LayerConfig[];
|
|
66
|
+
layerOrder: LayerOrderItem[];
|
|
67
|
+
}
|
|
68
|
+
export type MapState = {
|
|
69
|
+
mapConfigs: {
|
|
70
|
+
[key: string]: MapConfig;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export type RootState = {
|
|
74
|
+
mapConfig: MapState;
|
|
75
|
+
};
|
|
76
|
+
export declare const initialState: MapState;
|
|
77
|
+
export declare const getLayerByUuid: (state: MapState, uuid: string) => LayerConfig | null;
|
|
78
|
+
export declare const extractUuidsFromLayerOrder: (state: RootState, mapConfigKey: string) => string[];
|
|
79
|
+
declare const store: import("@reduxjs/toolkit").EnhancedStore<{
|
|
80
|
+
mapConfig: MapState;
|
|
81
|
+
}, import("redux").UnknownAction, import("@reduxjs/toolkit").Tuple<[import("redux").StoreEnhancer<{
|
|
82
|
+
dispatch: import("redux-thunk").ThunkDispatch<{
|
|
83
|
+
mapConfig: MapState;
|
|
84
|
+
}, undefined, import("redux").UnknownAction>;
|
|
85
|
+
}>, import("redux").StoreEnhancer]>>;
|
|
86
|
+
export declare const setMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
87
|
+
key: string;
|
|
88
|
+
mapConfig: MapConfig;
|
|
89
|
+
}, "mapConfig/setMapConfig">, removeMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
90
|
+
key: string;
|
|
91
|
+
}, "mapConfig/removeMapConfig">, setLayerInMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
92
|
+
mapConfigKey: string;
|
|
93
|
+
layer: LayerConfig;
|
|
94
|
+
}, "mapConfig/setLayerInMapConfig">, removeLayerFromMapConfig: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
95
|
+
mapConfigKey: string;
|
|
96
|
+
layerUuid: string;
|
|
97
|
+
}, "mapConfig/removeLayerFromMapConfig">, updateLayerOrder: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
98
|
+
mapConfigKey: string;
|
|
99
|
+
newOrder: LayerOrderItem[];
|
|
100
|
+
}, "mapConfig/updateLayerOrder">, setMasterVisible: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
|
|
101
|
+
mapConfigKey: string;
|
|
102
|
+
layerId: string;
|
|
103
|
+
masterVisible: boolean;
|
|
104
|
+
}, "mapConfig/setMasterVisible">;
|
|
105
|
+
export default store;
|
|
@@ -2,8 +2,6 @@ import React from 'react';
|
|
|
2
2
|
export interface ColorPickerProps {
|
|
3
3
|
onChange?: (value: string) => void;
|
|
4
4
|
convert: 'rgb' | 'rgba' | 'rgba_hex' | 'hex' | 'rgba_rgb';
|
|
5
|
-
internalValue?: string;
|
|
6
|
-
setValue?: (value: string) => void;
|
|
7
5
|
value?: string;
|
|
8
6
|
}
|
|
9
7
|
declare const ColorPicker: {
|
package/dist/{ui_components → src/ui_components}/LayerList/util/LayerListItemVectorLayer.d.ts
RENAMED
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MlVectorTileLayerProps } from '../../../components/MlVectorTileLayer/MlVectorTileLayer';
|
|
3
|
-
export declare const ListItemStyled: import("@emotion/styled").StyledComponent<{
|
|
4
|
-
button?: false | undefined;
|
|
5
|
-
} & import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
3
|
+
export declare const ListItemStyled: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, "ref"> & {
|
|
6
4
|
ref?: ((instance: HTMLLIElement | null) => void) | React.RefObject<HTMLLIElement> | null | undefined;
|
|
7
|
-
}, "className" | "style" | "classes" | "
|
|
5
|
+
}, "className" | "style" | "classes" | "children" | "components" | "componentsProps" | "slotProps" | "slots" | "alignItems" | "ContainerComponent" | "ContainerProps" | "dense" | "disableGutters" | "disablePadding" | "divider" | "secondaryAction" | "sx"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
8
6
|
export declare const CheckboxListItemIcon: import("@emotion/styled").StyledComponent<import("@mui/material").ListItemIconProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
9
7
|
export declare const CheckboxStyled: import("@emotion/styled").StyledComponent<import("@mui/material").CheckboxProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
|
|
10
8
|
interface LayerListItemVectorLayerProps {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SxProps } from '@mui/material';
|
|
3
|
+
import { LayerOrderItem } from '../../stores/map.store';
|
|
4
|
+
interface LayerTreeListItemProps {
|
|
5
|
+
visible?: boolean;
|
|
6
|
+
type?: 'background' | 'background-labels' | 'layer' | 'wms-layer' | 'vector-tile-layer';
|
|
7
|
+
name?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
setLayerState?: (state: unknown) => void;
|
|
10
|
+
showDeleteButton?: boolean;
|
|
11
|
+
listItemSx?: SxProps;
|
|
12
|
+
buttons?: JSX.Element;
|
|
13
|
+
sortable?: boolean;
|
|
14
|
+
mapConfigKey: string;
|
|
15
|
+
layerOrderConfig: LayerOrderItem;
|
|
16
|
+
}
|
|
17
|
+
declare function LayerTreeListItem(props: LayerTreeListItemProps): React.JSX.Element;
|
|
18
|
+
export default LayerTreeListItem;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CircleLayerSpecification, FillLayerSpecification, LineLayerSpecification } from 'maplibre-gl';
|
|
3
|
+
export type paintPropsType = CircleLayerSpecification['paint'] | FillLayerSpecification['paint'] | LineLayerSpecification['paint'];
|
|
4
|
+
interface LayerPropertyFormProps {
|
|
5
|
+
layerUuid: string;
|
|
6
|
+
mapConfigKey: string;
|
|
7
|
+
}
|
|
8
|
+
declare function LayerPropertyForm(props: LayerPropertyFormProps): React.JSX.Element;
|
|
9
|
+
export default LayerPropertyForm;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mapcomponents/react-maplibre",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
4
4
|
"main": "dist/index.cjs.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -23,13 +23,14 @@
|
|
|
23
23
|
"@dnd-kit/core": "^6.1.0",
|
|
24
24
|
"@dnd-kit/modifiers": "^7.0.0",
|
|
25
25
|
"@dnd-kit/sortable": "^8.0.0",
|
|
26
|
-
"@emotion/css": "^11.
|
|
27
|
-
"@emotion/react": "^11.
|
|
28
|
-
"@emotion/styled": "^11.
|
|
26
|
+
"@emotion/css": "^11.13.0",
|
|
27
|
+
"@emotion/react": "^11.13.3",
|
|
28
|
+
"@emotion/styled": "^11.13.0",
|
|
29
29
|
"@mapbox/mapbox-gl-draw": "^1.4.3",
|
|
30
30
|
"@mapbox/mapbox-gl-sync-move": "^0.3.1",
|
|
31
|
-
"@mui/icons-material": "^
|
|
32
|
-
"@mui/material": "^
|
|
31
|
+
"@mui/icons-material": "^6.1.1",
|
|
32
|
+
"@mui/material": "^6.1.1",
|
|
33
|
+
"@reduxjs/toolkit": "^2.0.1",
|
|
33
34
|
"@tmcw/togeojson": "^5.8.1",
|
|
34
35
|
"@turf/turf": "^6.5.0",
|
|
35
36
|
"@types/d3": "^7.4.3",
|
|
@@ -44,6 +45,9 @@
|
|
|
44
45
|
"pako": "^2.1.0",
|
|
45
46
|
"react-color": "^2.19.3",
|
|
46
47
|
"react-moveable": "^0.56.0",
|
|
48
|
+
"react-redux": "^9.1.2",
|
|
49
|
+
"redux": "^5.0.1",
|
|
50
|
+
"redux-thunk": "^3.1.0",
|
|
47
51
|
"three": "^0.161.0",
|
|
48
52
|
"topojson-client": "^3.1.0",
|
|
49
53
|
"uuid": "^9.0.1",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts
RENAMED
|
File without changes
|
/package/dist/{components → src/components}/MlSpatialElevationProfile/util/getElevationData.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/MlTemporalController/utils/TemporalControllerPlayer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
/package/dist/{components → src/components}/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|