@mapcomponents/react-maplibre 0.1.95 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.cjs +32 -0
- package/CHANGELOG.md +13 -0
- package/dist/{index.esm.css → assets/index.esm-Iqz0mZaU.css} +4 -4
- package/dist/components/MapLibreMap/MapLibreMap.d.ts +30 -31
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.d.ts +105 -105
- package/dist/components/MlCenterPosition/MlCenterPosition.d.ts +36 -36
- package/dist/components/MlComponentTemplate/MlComponentTemplate.d.ts +18 -18
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.d.ts +22 -22
- package/dist/components/MlCreatePdfForm/MlCreatePdfForm.d.ts +30 -30
- package/dist/components/MlCreatePdfForm/lib/PdfContext.d.ts +8 -8
- package/dist/components/MlCreatePdfForm/lib/PdfForm.d.ts +11 -11
- package/dist/components/MlCreatePdfForm/lib/PdfPreview.d.ts +26 -26
- package/dist/components/MlCreatePdfForm/lib/pdf.templates.d.ts +11 -11
- package/dist/components/MlCreatePngButton/MlCreatePngButton.d.ts +22 -22
- package/dist/components/MlFeatureEditor/MlFeatureEditor.d.ts +5 -5
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +62 -62
- package/dist/components/MlFollowGps/MlFollowGps.d.ts +81 -81
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +97 -97
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.lineStyler.d.ts +9 -2
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeoJsonLayer.polygonStyler.d.ts +8 -2
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerCircleStyler.d.ts +4 -4
- package/dist/components/MlGeoJsonLayer/story_utils/MlGeojsonLayerHeatMapStyler.d.ts +4 -4
- package/dist/components/MlGeoJsonLayer/util/getDefaultLayerTypeByGeometry.d.ts +2 -2
- package/dist/components/MlGeoJsonLayer/util/getDefaultPaintPropsByType.d.ts +5 -5
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.d.ts +23 -23
- package/dist/components/MlGpxViewer/MlGpxViewer.d.ts +31 -31
- package/dist/components/MlGpxViewer/util/GeoJsonContext.d.ts +10 -10
- package/dist/components/MlGpxViewer/util/GeoJsonProvider.d.ts +5 -5
- package/dist/components/MlGpxViewer/util/Metadata.d.ts +7 -7
- package/dist/components/MlGpxViewer/util/MlGpxDemoLoader.d.ts +11 -11
- package/dist/components/MlGpxViewer/util/MlGpxViewerInstructions.d.ts +4 -4
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.d.ts +39 -39
- package/dist/components/MlLayer/MlLayer.d.ts +33 -33
- package/dist/components/MlLayerMagnify/MlLayerMagnify.d.ts +33 -33
- package/dist/components/MlLayerSwipe/MlLayerSwipe.d.ts +26 -26
- package/dist/components/MlLayerSwitcher/MlLayerSwitcher.d.ts +29 -30
- package/dist/components/MlLayerSwitcher/components/LayerBox.d.ts +10 -6
- package/dist/components/MlMarker/MlMarker.d.ts +34 -34
- package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +36 -36
- package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.d.ts +55 -55
- package/dist/components/MlNavigationCompass/MlNavigationCompass.d.ts +33 -33
- package/dist/components/MlNavigationTools/MlNavigationTools.d.ts +55 -55
- package/dist/components/MlOrderLayers/MlOrderLayers.d.ts +21 -21
- package/dist/components/MlScaleReference/MlScaleReference.d.ts +9 -9
- package/dist/components/MlShareMapState/MlShareMapState.d.ts +42 -42
- package/dist/components/MlSketchTool/MlSketchTool.d.ts +42 -42
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.d.ts +40 -40
- package/dist/components/MlSpatialElevationProfile/util/getElevationData.d.ts +12 -14
- package/dist/components/MlTemporalController/MlTemporalController.d.ts +181 -181
- package/dist/components/MlTemporalController/utils/MlTemporalControllerLabels.d.ts +20 -20
- package/dist/components/MlTemporalController/utils/TemporalControllerPlayer.d.ts +22 -22
- package/dist/components/MlTemporalController/utils/paintPicker.d.ts +59 -59
- package/dist/components/MlTemporalController/utils/useFilterData.d.ts +14 -14
- package/dist/components/MlTerrainLayer/MlTerrainLayer.d.ts +28 -28
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.d.ts +30 -30
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.d.ts +12 -10
- package/dist/components/MlUseMapDebugger/MlUseMapDebugger.d.ts +18 -22
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.d.ts +19 -19
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.d.ts +29 -22
- package/dist/components/MlWmsLayer/MlWmsLayer.d.ts +104 -104
- package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +125 -125
- package/dist/components/MlWmsLoader/utils/MlWmsLoaderInstructions.d.ts +4 -4
- package/dist/components/MlWmsLoader/utils/WMSLinks.d.ts +8 -8
- package/dist/contexts/LayerContext.d.ts +59 -59
- package/dist/contexts/MapContext.d.ts +24 -24
- package/dist/contexts/SimpleDataContext.d.ts +4 -4
- package/dist/contexts/SimpleDataProvider.d.ts +18 -8
- package/dist/decorators/EmptyMapDecorator.d.ts +4 -2
- package/dist/decorators/GeoJsonMapDecorator.d.ts +4 -2
- package/dist/decorators/LowZoomDecorator.d.ts +4 -2
- package/dist/decorators/MapContextDecorator.d.ts +4 -2
- package/dist/decorators/MapContextDecoratorHooks.d.ts +4 -2
- package/dist/decorators/MultiMapContextDecorator.d.ts +4 -2
- package/dist/decorators/NoNavToolsDecorator.d.ts +4 -2
- package/dist/decorators/ThemeDecorator.d.ts +5 -2
- package/dist/hooks/useAddImage/useAddImage.d.ts +20 -20
- package/dist/hooks/useAddProtocol/useAddProtocol.d.ts +23 -23
- package/dist/hooks/useCameraFollowPath/useCameraFollowPath.d.ts +35 -35
- package/dist/hooks/useExportMap/index.d.ts +11 -11
- package/dist/hooks/useExportMap/lib.d.ts +51 -51
- package/dist/hooks/useFeatureEditor/useFeatureEditor.d.ts +46 -46
- package/dist/hooks/useFeatureEditor/utils/FeatureEditorStyle.d.ts +88 -88
- package/dist/hooks/useFitLayerBounds.d.ts +8 -8
- package/dist/hooks/useGpx/useGpx.d.ts +26 -26
- package/dist/hooks/useLayer.d.ts +36 -36
- package/dist/hooks/useLayerContext.d.ts +2 -2
- package/dist/hooks/useLayerFilter/useLayerFilter.d.ts +8 -8
- package/dist/hooks/useLayerHoverPopup/{useLayerHoverPopup.d.ts → LayerHoverPopup.d.ts} +23 -24
- package/dist/hooks/useMap.d.ts +14 -14
- package/dist/hooks/useMapState.d.ts +62 -62
- package/dist/hooks/useSource.d.ts +17 -17
- package/dist/hooks/useWms.d.ts +26 -26
- package/dist/index.d.ts +87 -89
- package/dist/index.esm.js +19777 -19977
- package/dist/index.esm.js.map +1 -1
- package/dist/omt_styles/bright.d.ts +2495 -2495
- package/dist/omt_styles/config.d.ts +7 -7
- package/dist/omt_styles/gruvbox.d.ts +2420 -2420
- package/dist/omt_styles/medieval_kingdom.d.ts +2420 -2420
- package/dist/omt_styles/monokai.d.ts +2420 -2420
- package/dist/omt_styles/oceanic_next.d.ts +2420 -2420
- package/dist/omt_styles/solarized.d.ts +2420 -2420
- package/dist/protocol_handlers/csv.d.ts +8 -8
- package/dist/protocol_handlers/mbtiles.d.ts +33 -33
- package/dist/protocol_handlers/osm.d.ts +11 -11
- package/dist/protocol_handlers/topojson.d.ts +9 -9
- package/dist/protocol_handlers/utils/getProtocolData.d.ts +1 -1
- package/dist/protocol_handlers/utils/protocolPathParser.d.ts +7 -7
- package/dist/protocol_handlers/xml.d.ts +10 -10
- package/dist/ui_components/AddLayerButton/AddLayerButton.d.ts +17 -17
- package/dist/ui_components/AddLayerButton/AddLayerPopup.d.ts +15 -15
- package/dist/ui_components/AddLayerButton/LayerConfigForms/GeoJsonLayerForm.d.ts +8 -8
- package/dist/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +10 -10
- package/dist/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +13 -13
- package/dist/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +10 -10
- package/dist/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +10 -10
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +6 -6
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +7 -7
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +6 -6
- package/dist/ui_components/ColorPicker/ColorPicker.d.ts +17 -17
- package/dist/ui_components/ColorPicker/transformers.d.ts +10 -10
- package/dist/ui_components/ConfirmDialog.d.ts +16 -16
- package/dist/ui_components/DemoDescriptions.d.ts +12 -12
- package/dist/ui_components/Dropzone.d.ts +6 -6
- package/dist/ui_components/ImageLoader.d.ts +10 -10
- package/dist/ui_components/LayerList/LayerList.d.ts +7 -7
- package/dist/ui_components/LayerList/LayerListFolder.d.ts +9 -9
- package/dist/ui_components/LayerList/LayerListItem.d.ts +26 -26
- package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +18 -18
- package/dist/ui_components/LayerList/util/LayerListItemVectorLayer.d.ts +23 -36
- package/dist/ui_components/LayerList/util/LayerPropertyForm.d.ts +10 -10
- package/dist/ui_components/LayerList/util/SortableContainer.d.ts +7 -7
- package/dist/ui_components/LayerList/util/input/ColorPicker.d.ts +10 -10
- package/dist/ui_components/LoadingOverlayContext.d.ts +10 -10
- package/dist/ui_components/MapcomponentsTheme.d.ts +35 -35
- package/dist/ui_components/SelectStyleButton/SelectStyleButton.d.ts +20 -20
- package/dist/ui_components/SelectStyleButton/SelectStylePopup.d.ts +18 -18
- package/dist/ui_components/Sidebar.d.ts +12 -12
- package/dist/ui_components/SpeedDial/SpeedDial.d.ts +14 -14
- package/dist/ui_components/TopToolbar.d.ts +9 -9
- package/dist/ui_components/UploadButton.d.ts +8 -8
- package/dist/util/BubbleForInstructions.d.ts +16 -2
- package/dist/util/Instructions.d.ts +14 -14
- package/package.json +207 -208
- package/rollup.config.mjs +76 -0
- package/dist/components/MapLibreMap/MapLibreMap.stories.d.ts +0 -20
- package/dist/components/MapLibreMap/MapLibreMap.test.d.ts +0 -1
- package/dist/components/MapLibreMap/lib/MapLibreGlWrapper.test.d.ts +0 -1
- package/dist/components/MlBasicComponent.d.ts +0 -5
- package/dist/components/MlCenterPosition/MlCenterPosition.stories.d.ts +0 -21
- package/dist/components/MlComponentTemplate/MlComponentTemplate.stories.d.ts +0 -14
- package/dist/components/MlCreatePdfButton/MlCreatePdfButton.stories.d.ts +0 -14
- package/dist/components/MlCreatePdfForm/MlCreatePdfForm.cy.d.ts +0 -1
- package/dist/components/MlCreatePdfForm/MlCreatePdfForm.stories.d.ts +0 -15
- package/dist/components/MlCreatePdfForm/lib/_PdfPreview.d.ts +0 -14
- package/dist/components/MlCreatePngButton/MlCreatePngButton.stories.d.ts +0 -14
- package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +0 -16
- package/dist/components/MlFeatureEditor/MlFeatureEditor.test.d.ts +0 -1
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +0 -27
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.test.d.ts +0 -1
- package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +0 -11
- package/dist/components/MlFollowGps/MlFollowGps.test.d.ts +0 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +0 -18
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.test.d.ts +0 -1
- package/dist/components/MlGeojsonLayerWithSource/MlGeojsonLayerWithSource.stories.d.ts +0 -14
- package/dist/components/MlGpxViewer/MlGpxViewer.stories.d.ts +0 -18
- package/dist/components/MlGpxViewer/MlGpxViewer.test.d.ts +0 -1
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.stories.d.ts +0 -9
- package/dist/components/MlImageMarkerLayer/MlImageMarkerLayer.test.d.ts +0 -1
- package/dist/components/MlLayer/MlLayer.test.d.ts +0 -1
- package/dist/components/MlLayerMagnify/MlLayerMagnify.stories.d.ts +0 -15
- package/dist/components/MlLayerMagnify/MlLayerMagnify.test.d.ts +0 -1
- package/dist/components/MlLayerSwipe/MlLayerSwipe.stories.d.ts +0 -14
- package/dist/components/MlLayerSwipe/MlLayerSwipe.test.d.ts +0 -1
- package/dist/components/MlLayerSwitcher/MlLayerSwitcher.stories.d.ts +0 -13
- package/dist/components/MlMarker/MlMarker.stories.d.ts +0 -9
- package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +0 -12
- package/dist/components/MlMultiMeasureTool/MlMultiMeasureTool.stories.d.ts +0 -16
- package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +0 -10
- package/dist/components/MlNavigationCompass/MlNavigationCompass.test.d.ts +0 -1
- package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +0 -29
- package/dist/components/MlOrderLayers/MlOrderLayers.stories.d.ts +0 -15
- package/dist/components/MlOsmLayer/MlOsmLayer.d.ts +0 -18
- package/dist/components/MlOsmLayer/MlOsmLayer.stories_.d.ts +0 -16
- package/dist/components/MlOsmLayer/MlOsmLayer.test.d.ts +0 -1
- package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +0 -15
- package/dist/components/MlShareMapState/MlShareMapState.stories.d.ts +0 -17
- package/dist/components/MlSketchTool/MlSketchTool.stories.d.ts +0 -15
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.stories.d.ts +0 -20
- package/dist/components/MlSpatialElevationProfile/MlSpatialElevationProfile.test.d.ts +0 -1
- package/dist/components/MlTemporalController/MlTemporalController.stories.d.ts +0 -34
- package/dist/components/MlTerrainLayer/MlTerrainLayer.cy.d.ts +0 -1
- package/dist/components/MlTerrainLayer/MlTerrainLayer.stories.d.ts +0 -14
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.stories.d.ts +0 -22
- package/dist/components/MlThreeJsLayer/MlThreeJsLayer.test.d.ts +0 -1
- package/dist/components/MlThreeJsLayer/lib/GLTFLoader.d.ts +0 -18
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.stories.d.ts +0 -13
- package/dist/components/MlTransitionGeoJsonLayer/MlTransitionGeoJsonLayer.test.d.ts +0 -1
- package/dist/components/MlTransitionGeoJsonLayer/util/transitionFunctions.d.ts +0 -2
- package/dist/components/MlUseMapDebugger/MlUseMapDebugger.stories.d.ts +0 -13
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.stories.d.ts +0 -13
- package/dist/components/MlVectorTileLayer/MlVectorTileLayer.test.d.ts +0 -1
- package/dist/components/MlWmsFeatureInfoPopup/MlWmsFeatureInfoPopup.stories.d.ts +0 -22
- package/dist/components/MlWmsLayer/MlWmsLayer.stories.d.ts +0 -13
- package/dist/components/MlWmsLayer/MlWmsLayer.test.d.ts +0 -1
- package/dist/components/MlWmsLoader/MlWmsLoader.stories.d.ts +0 -30
- package/dist/contexts/MapComponentsProvider.test.d.ts +0 -1
- package/dist/contexts/SimpleDataProvider.test.d.ts +0 -1
- package/dist/hooks/useAddImage/useAddImage.stories.d.ts +0 -14
- package/dist/hooks/useAddImage/useaddImage.cy.d.ts +0 -1
- package/dist/hooks/useAddProtocol/useAddProtocol.stories.d.ts +0 -22
- package/dist/hooks/useCameraFollowPath/useCameraFollowPath.stories.d.ts +0 -18
- package/dist/hooks/useGpx/lib/gpxConverter.d.ts +0 -11
- package/dist/hooks/useGpx/useGpx.stories.d.ts +0 -10
- package/dist/hooks/useLayer.test.d.ts +0 -1
- package/dist/hooks/useLayerEvent.d.ts +0 -2
- package/dist/hooks/useLayerFilter/useLayerFilter.stories.d.ts +0 -10
- package/dist/hooks/useLayerHoverPopup/useLayerHoverPopup.stories.d.ts +0 -10
- package/dist/hooks/useMap.test.d.ts +0 -1
- package/dist/hooks/useMapState.stories.d.ts +0 -14
- package/dist/hooks/useSources.stories.d.ts +0 -13
- package/dist/setupTests.d.ts +0 -13
- package/dist/stories/components/Readme.d.ts +0 -2
- package/dist/ui_components/AddLayerButton/AddLayerButton.stories.d.ts +0 -13
- package/dist/ui_components/LayerList/LayerList.stories.d.ts +0 -15
- package/dist/ui_components/SelectStyleButton/SelectStyleButton.stories.d.ts +0 -15
- package/dist/ui_components/SpeedDial/SpeedDial.stories.d.ts +0 -21
- package/dist/util/index.d.ts +0 -3
- package/dist/util/layerRemovalTest.d.ts +0 -2
- package/dist/util/sourceRemovalTest.d.ts +0 -2
package/.eslintrc.cjs
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
env: {
|
|
3
|
+
browser: true,
|
|
4
|
+
node: true,
|
|
5
|
+
es2021: true,
|
|
6
|
+
},
|
|
7
|
+
extends: [
|
|
8
|
+
"eslint:recommended",
|
|
9
|
+
"plugin:react/recommended",
|
|
10
|
+
"plugin:@typescript-eslint/recommended",
|
|
11
|
+
"prettier",
|
|
12
|
+
"plugin:storybook/recommended"
|
|
13
|
+
],
|
|
14
|
+
overrides: [],
|
|
15
|
+
parser: '@typescript-eslint/parser',
|
|
16
|
+
parserOptions: {
|
|
17
|
+
ecmaVersion: 'latest',
|
|
18
|
+
sourceType: 'module',
|
|
19
|
+
},
|
|
20
|
+
plugins: ['react', '@typescript-eslint'],
|
|
21
|
+
rules: {
|
|
22
|
+
'react/prop-types': 'off',
|
|
23
|
+
// empty functions can sometimes be set intentionally. e.g. with useRef/useState, if we want an empty function first
|
|
24
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
25
|
+
"@typescript-eslint/no-explicit-any": "off"
|
|
26
|
+
},
|
|
27
|
+
settings: {
|
|
28
|
+
react: {
|
|
29
|
+
version: 'detect',
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
};
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
|
|
4
|
+
## [v1.0.0] - 2024-02-15
|
|
5
|
+
|
|
6
|
+
### Changed
|
|
7
|
+
- 5500815: upgrade to maplibre v4.0.0
|
|
8
|
+
- 7629f88: upgrade storybook and all dependencies to the latest major release
|
|
9
|
+
|
|
10
|
+
## [v0.1.96] - 2024-01-29
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- 2925672: fix overwrite options.paint in LayerListItem
|
|
15
|
+
|
|
3
16
|
## [v0.1.95] - 2024-01-23
|
|
4
17
|
|
|
5
18
|
### Fixed
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
.
|
|
2
|
+
.maplibregl-compare {
|
|
3
3
|
background-color:#fff;
|
|
4
4
|
position:absolute;
|
|
5
5
|
width:2px;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
margin-left:0;
|
|
10
10
|
left:0;
|
|
11
11
|
}
|
|
12
|
-
.
|
|
12
|
+
.maplibregl-compare .compare-swiper-vertical {
|
|
13
13
|
z-index:120;
|
|
14
14
|
background-color:#3887be;
|
|
15
15
|
box-shadow:inset 0 0 0 2px #fff;
|
|
@@ -26,12 +26,12 @@
|
|
|
26
26
|
background-image:url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+PHN2ZyAgIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIiAgIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyIgICB4bWxuczpzdmc9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgICB4bWxuczpzb2RpcG9kaT0iaHR0cDovL3NvZGlwb2RpLnNvdXJjZWZvcmdlLm5ldC9EVEQvc29kaXBvZGktMC5kdGQiICAgeG1sbnM6aW5rc2NhcGU9Imh0dHA6Ly93d3cuaW5rc2NhcGUub3JnL25hbWVzcGFjZXMvaW5rc2NhcGUiICAgd2lkdGg9IjYwIiAgIGhlaWdodD0iNjAiICAgdmVyc2lvbj0iMS4xIiAgIHZpZXdCb3g9IjAgMCA2MCA2MCIgICBpZD0ic3ZnNTQzNCIgICBpbmtzY2FwZTp2ZXJzaW9uPSIwLjkxK2RldmVsK29zeG1lbnUgcjEyOTExIiAgIHNvZGlwb2RpOmRvY25hbWU9Imwtci5zdmciPiAgPG1ldGFkYXRhICAgICBpZD0ibWV0YWRhdGE1NDQ0Ij4gICAgPHJkZjpSREY+ICAgICAgPGNjOldvcmsgICAgICAgICByZGY6YWJvdXQ9IiI+ICAgICAgICA8ZGM6Zm9ybWF0PmltYWdlL3N2Zyt4bWw8L2RjOmZvcm1hdD4gICAgICAgIDxkYzp0eXBlICAgICAgICAgICByZGY6cmVzb3VyY2U9Imh0dHA6Ly9wdXJsLm9yZy9kYy9kY21pdHlwZS9TdGlsbEltYWdlIiAvPiAgICAgICAgPGRjOnRpdGxlPjwvZGM6dGl0bGU+ICAgICAgPC9jYzpXb3JrPiAgICA8L3JkZjpSREY+ICA8L21ldGFkYXRhPiAgPGRlZnMgICAgIGlkPSJkZWZzNTQ0MiIgLz4gIDxzb2RpcG9kaTpuYW1lZHZpZXcgICAgIHBhZ2Vjb2xvcj0iI2ZmZmZmZiIgICAgIGJvcmRlcmNvbG9yPSIjNjY2NjY2IiAgICAgYm9yZGVyb3BhY2l0eT0iMSIgICAgIG9iamVjdHRvbGVyYW5jZT0iMTAiICAgICBncmlkdG9sZXJhbmNlPSIxMCIgICAgIGd1aWRldG9sZXJhbmNlPSIxMCIgICAgIGlua3NjYXBlOnBhZ2VvcGFjaXR5PSIwIiAgICAgaW5rc2NhcGU6cGFnZXNoYWRvdz0iMiIgICAgIGlua3NjYXBlOndpbmRvdy13aWR0aD0iMTI4NiIgICAgIGlua3NjYXBlOndpbmRvdy1oZWlnaHQ9Ijc1MSIgICAgIGlkPSJuYW1lZHZpZXc1NDQwIiAgICAgc2hvd2dyaWQ9InRydWUiICAgICBpbmtzY2FwZTp6b29tPSI0IiAgICAgaW5rc2NhcGU6Y3g9IjI1Ljg4OTgzMSIgICAgIGlua3NjYXBlOmN5PSIzNC4zODE4MzMiICAgICBpbmtzY2FwZTp3aW5kb3cteD0iMCIgICAgIGlua3NjYXBlOndpbmRvdy15PSIyMyIgICAgIGlua3NjYXBlOndpbmRvdy1tYXhpbWl6ZWQ9IjAiICAgICBpbmtzY2FwZTpjdXJyZW50LWxheWVyPSJzdmc1NDM0IiAgICAgaW5rc2NhcGU6b2JqZWN0LW5vZGVzPSJ0cnVlIiAgICAgaW5rc2NhcGU6c25hcC1zbW9vdGgtbm9kZXM9InRydWUiPiAgICA8aW5rc2NhcGU6Z3JpZCAgICAgICB0eXBlPSJ4eWdyaWQiICAgICAgIGlkPSJncmlkNTk4OSIgLz4gIDwvc29kaXBvZGk6bmFtZWR2aWV3PiAgPHBhdGggICAgIHN0eWxlPSJmaWxsOiNmZmZmZmY7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOm5vbmU7c3Ryb2tlLXdpZHRoOjFweDtzdHJva2UtbGluZWNhcDpidXR0O3N0cm9rZS1saW5lam9pbjptaXRlcjtzdHJva2Utb3BhY2l0eToxIiAgICAgZD0iTSAyNSAyNCBMIDE2IDMwIEwgMjUgMzYgTCAyNSAyNCB6IE0gMzUgMjQgTCAzNSAzNiBMIDQ0IDMwIEwgMzUgMjQgeiAiICAgICBpZD0icGF0aDU5OTUiIC8+PC9zdmc+);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
.
|
|
29
|
+
.maplibregl-compare-horizontal {
|
|
30
30
|
position:relative;
|
|
31
31
|
width:100%;
|
|
32
32
|
height:2px;
|
|
33
33
|
}
|
|
34
|
-
.
|
|
34
|
+
.maplibregl-compare .compare-swiper-horizontal {
|
|
35
35
|
background-color:#3887be;
|
|
36
36
|
box-shadow:inset 0 0 0 2px #fff;
|
|
37
37
|
display:inline-block;
|
|
@@ -1,31 +1,30 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { MapOptions as MapOptionsType } from 'maplibre-gl';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
export default MapLibreMap;
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { MapOptions as MapOptionsType } from 'maplibre-gl';
|
|
3
|
+
export type MapLibreMapProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Id of the MapLibreGl(Wrapper) instance in mapContext
|
|
6
|
+
*/
|
|
7
|
+
mapId?: string;
|
|
8
|
+
/**
|
|
9
|
+
* Config object that is passed to the MapLibreGl constructor as first parameter.
|
|
10
|
+
* See https://maplibre.org/maplibre-gl-js-docs/api/map/ for a formal documentation of al
|
|
11
|
+
* available properties.
|
|
12
|
+
*/
|
|
13
|
+
options?: Partial<MapOptionsType>;
|
|
14
|
+
/**
|
|
15
|
+
* css style definition passed to the map container DOM element
|
|
16
|
+
*/
|
|
17
|
+
style?: object;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Creates a MapLibreGlWrapper instance and registers it in MapContext
|
|
21
|
+
* after the MapLibre-gl load event has fired.
|
|
22
|
+
*
|
|
23
|
+
* MapLibreMap returns the html node that will be used by MapLibre-gl to render the map.
|
|
24
|
+
* This Component must be kept unaware of any related components that interact with the MapLibre-gl
|
|
25
|
+
* instance.
|
|
26
|
+
*
|
|
27
|
+
* @category Map components
|
|
28
|
+
*/
|
|
29
|
+
declare const MapLibreMap: FC<MapLibreMapProps>;
|
|
30
|
+
export default MapLibreMap;
|
|
@@ -1,105 +1,105 @@
|
|
|
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 = [string, (arg0: unknown) => void];
|
|
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
|
-
declare class MapLibreGlWrapper {
|
|
45
|
-
registeredElements: {
|
|
46
|
-
[key: string]: {
|
|
47
|
-
layers: [string?];
|
|
48
|
-
sources: [string?];
|
|
49
|
-
images: [string?];
|
|
50
|
-
controls: [(IControl | unknown)?];
|
|
51
|
-
events: [EventArgArray?];
|
|
52
|
-
wrapperEvents: [WrapperEventArgArray?];
|
|
53
|
-
};
|
|
54
|
-
};
|
|
55
|
-
baseLayers: [string?];
|
|
56
|
-
firstSymbolLayer: string | undefined;
|
|
57
|
-
eventHandlers: {
|
|
58
|
-
layerchange: {
|
|
59
|
-
handler: (ev: unknown) => void;
|
|
60
|
-
options?: object | string;
|
|
61
|
-
}[];
|
|
62
|
-
viewportchange: {
|
|
63
|
-
handler: (ev: unknown) => void;
|
|
64
|
-
}[];
|
|
65
|
-
};
|
|
66
|
-
wrapper: {
|
|
67
|
-
on: (eventName: string, handler: (ev: unknown) => void, options?: object | string, componentId?: string) => void;
|
|
68
|
-
off: (type: string, listener: (ev: unknown) => void) => void;
|
|
69
|
-
fire: (eventName: string, context?: unknown) => void;
|
|
70
|
-
layerState: LayerState[];
|
|
71
|
-
layerStateString: string;
|
|
72
|
-
oldLayerStateStrings: object;
|
|
73
|
-
buildLayerObject: (layer: ReturnType<Style['getLayer']>) => LayerState;
|
|
74
|
-
buildLayerObjects: () => LayerState[];
|
|
75
|
-
refreshLayerState: () => void;
|
|
76
|
-
viewportState: ViewportState;
|
|
77
|
-
viewportStateString: string;
|
|
78
|
-
oldViewportStateString: string;
|
|
79
|
-
getViewport: () => {
|
|
80
|
-
center: {
|
|
81
|
-
lng: number;
|
|
82
|
-
lat: number;
|
|
83
|
-
};
|
|
84
|
-
zoom: number;
|
|
85
|
-
bearing: number;
|
|
86
|
-
pitch: number;
|
|
87
|
-
};
|
|
88
|
-
refreshViewport: () => void;
|
|
89
|
-
};
|
|
90
|
-
initRegisteredElements: (componentId: string, force?: boolean | undefined) => void;
|
|
91
|
-
addNativeMaplibreFunctionsAndProps: () => void;
|
|
92
|
-
map: MapType;
|
|
93
|
-
style: Style;
|
|
94
|
-
styleJson: object;
|
|
95
|
-
addSource: (id: string, source: SourceSpecification, componentId?: string | undefined) => this;
|
|
96
|
-
addControl: (control: IControl | unknown, position?: ControlPosition | undefined, componentId?: string | undefined) => this;
|
|
97
|
-
on: (type: keyof MapLayerEventType | keyof MapEventType | string, layerId: string | ((ev: unknown) => void), handler?: ((ev: MapEventType & unknown) => Map | void) | string, componentId?: string | undefined) => this;
|
|
98
|
-
cleanup: (componentId: string) => void;
|
|
99
|
-
constructor(props: {
|
|
100
|
-
mapOptions: MapOptionsType;
|
|
101
|
-
onReady: (map: MapType, context: unknown) => void;
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
export default MapLibreGlWrapper;
|
|
105
|
-
export type { LayerState, ViewportState };
|
|
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 = [string, (arg0: unknown) => void];
|
|
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
|
+
declare class MapLibreGlWrapper {
|
|
45
|
+
registeredElements: {
|
|
46
|
+
[key: string]: {
|
|
47
|
+
layers: [string?];
|
|
48
|
+
sources: [string?];
|
|
49
|
+
images: [string?];
|
|
50
|
+
controls: [(IControl | unknown)?];
|
|
51
|
+
events: [EventArgArray?];
|
|
52
|
+
wrapperEvents: [WrapperEventArgArray?];
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
baseLayers: [string?];
|
|
56
|
+
firstSymbolLayer: string | undefined;
|
|
57
|
+
eventHandlers: {
|
|
58
|
+
layerchange: {
|
|
59
|
+
handler: (ev: unknown) => void;
|
|
60
|
+
options?: object | string;
|
|
61
|
+
}[];
|
|
62
|
+
viewportchange: {
|
|
63
|
+
handler: (ev: unknown) => void;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
wrapper: {
|
|
67
|
+
on: (eventName: string, handler: (ev: unknown) => void, options?: object | string, componentId?: string) => void;
|
|
68
|
+
off: (type: string, listener: (ev: unknown) => void) => void;
|
|
69
|
+
fire: (eventName: string, context?: unknown) => void;
|
|
70
|
+
layerState: LayerState[];
|
|
71
|
+
layerStateString: string;
|
|
72
|
+
oldLayerStateStrings: object;
|
|
73
|
+
buildLayerObject: (layer: ReturnType<Style['getLayer']>) => LayerState | undefined;
|
|
74
|
+
buildLayerObjects: () => LayerState[];
|
|
75
|
+
refreshLayerState: () => void;
|
|
76
|
+
viewportState: ViewportState;
|
|
77
|
+
viewportStateString: string;
|
|
78
|
+
oldViewportStateString: string;
|
|
79
|
+
getViewport: () => {
|
|
80
|
+
center: {
|
|
81
|
+
lng: number;
|
|
82
|
+
lat: number;
|
|
83
|
+
};
|
|
84
|
+
zoom: number;
|
|
85
|
+
bearing: number;
|
|
86
|
+
pitch: number;
|
|
87
|
+
};
|
|
88
|
+
refreshViewport: () => void;
|
|
89
|
+
};
|
|
90
|
+
initRegisteredElements: (componentId: string, force?: boolean | undefined) => void;
|
|
91
|
+
addNativeMaplibreFunctionsAndProps: () => void;
|
|
92
|
+
map: MapType;
|
|
93
|
+
style: Style;
|
|
94
|
+
styleJson: object;
|
|
95
|
+
addSource: (id: string, source: SourceSpecification, componentId?: string | undefined) => this;
|
|
96
|
+
addControl: (control: IControl | unknown, position?: ControlPosition | undefined, componentId?: string | undefined) => this;
|
|
97
|
+
on: (type: keyof MapLayerEventType | keyof MapEventType | string, layerId: string | ((ev: unknown) => void), handler?: ((ev: MapEventType & unknown) => Map | void) | string, componentId?: string | undefined) => this;
|
|
98
|
+
cleanup: (componentId: string) => void;
|
|
99
|
+
constructor(props: {
|
|
100
|
+
mapOptions: MapOptionsType;
|
|
101
|
+
onReady: (map: MapType, context: unknown) => void;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
export default MapLibreGlWrapper;
|
|
105
|
+
export type { LayerState, ViewportState };
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
|
|
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): JSX.Element;
|
|
32
|
-
defaultProps: {
|
|
33
|
-
mapId: undefined;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export default MlCenterPosition;
|
|
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,18 +1,18 @@
|
|
|
1
|
-
|
|
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): JSX.Element;
|
|
14
|
-
defaultProps: {
|
|
15
|
-
mapId: undefined;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
export default MlComponentTemplate;
|
|
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,22 +1,22 @@
|
|
|
1
|
-
|
|
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): JSX.Element;
|
|
18
|
-
defaultProps: {
|
|
19
|
-
mapId: undefined;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
export default MlCreatePdfButton;
|
|
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,30 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
import { createPdfResolverParams } from '../../hooks/useExportMap/lib';
|
|
3
|
-
import { SxProps } from '@mui/material';
|
|
4
|
-
interface MlCreatePdfFormProps {
|
|
5
|
-
/**
|
|
6
|
-
* Id of the target MapLibre instance in mapContext
|
|
7
|
-
*/
|
|
8
|
-
mapId?: string;
|
|
9
|
-
/**
|
|
10
|
-
* sx props that will be applied to the form control components
|
|
11
|
-
*/
|
|
12
|
-
formControlStyles?: SxProps;
|
|
13
|
-
/**
|
|
14
|
-
* Function that will be called before the PDF is created.
|
|
15
|
-
* Allowing to access and manipulate the jspdf instance before the PDF is created.
|
|
16
|
-
*/
|
|
17
|
-
onCreatePdf?: (options: createPdfResolverParams) => createPdfResolverParams;
|
|
18
|
-
}
|
|
19
|
-
export type { MlCreatePdfFormProps };
|
|
20
|
-
/**
|
|
21
|
-
* Create PDF Form Component
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
declare const MlCreatePdfForm: {
|
|
25
|
-
(props: MlCreatePdfFormProps): JSX.Element;
|
|
26
|
-
defaultProps: {
|
|
27
|
-
mapId: undefined;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
export default MlCreatePdfForm;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPdfResolverParams } from '../../hooks/useExportMap/lib';
|
|
3
|
+
import { SxProps } from '@mui/material';
|
|
4
|
+
interface MlCreatePdfFormProps {
|
|
5
|
+
/**
|
|
6
|
+
* Id of the target MapLibre instance in mapContext
|
|
7
|
+
*/
|
|
8
|
+
mapId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* sx props that will be applied to the form control components
|
|
11
|
+
*/
|
|
12
|
+
formControlStyles?: SxProps;
|
|
13
|
+
/**
|
|
14
|
+
* Function that will be called before the PDF is created.
|
|
15
|
+
* Allowing to access and manipulate the jspdf instance before the PDF is created.
|
|
16
|
+
*/
|
|
17
|
+
onCreatePdf?: (options: createPdfResolverParams) => createPdfResolverParams;
|
|
18
|
+
}
|
|
19
|
+
export type { MlCreatePdfFormProps };
|
|
20
|
+
/**
|
|
21
|
+
* Create PDF Form Component
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
declare const MlCreatePdfForm: {
|
|
25
|
+
(props: MlCreatePdfFormProps): React.JSX.Element;
|
|
26
|
+
defaultProps: {
|
|
27
|
+
mapId: undefined;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
export default MlCreatePdfForm;
|
|
@@ -1,8 +1,8 @@
|
|
|
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
|
-
}) => JSX.Element;
|
|
7
|
-
export { PdfContextProvider };
|
|
8
|
-
export default PdfContext;
|
|
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,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import { createPdfResolverParams } from '../../../hooks/useExportMap/lib';
|
|
3
|
-
interface PdfFormProps {
|
|
4
|
-
/**
|
|
5
|
-
* Id of the target MapLibre instance in mapContext
|
|
6
|
-
*/
|
|
7
|
-
mapId?: string;
|
|
8
|
-
onCreatePdf?: (options: createPdfResolverParams) => createPdfResolverParams;
|
|
9
|
-
}
|
|
10
|
-
export default function PdfForm(props: PdfFormProps): JSX.Element;
|
|
11
|
-
export {};
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createPdfResolverParams } from '../../../hooks/useExportMap/lib';
|
|
3
|
+
interface PdfFormProps {
|
|
4
|
+
/**
|
|
5
|
+
* Id of the target MapLibre instance in mapContext
|
|
6
|
+
*/
|
|
7
|
+
mapId?: string;
|
|
8
|
+
onCreatePdf?: (options: createPdfResolverParams) => createPdfResolverParams;
|
|
9
|
+
}
|
|
10
|
+
export default function PdfForm(props: PdfFormProps): React.JSX.Element;
|
|
11
|
+
export {};
|