@mapcomponents/react-maplibre 0.1.86 → 0.1.87
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 +9 -0
- package/dist/components/MlFeatureEditor/MlFeatureEditor.stories.d.ts +1 -0
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.d.ts +1 -1
- package/dist/components/MlFillExtrusionLayer/MlFillExtrusionLayer.stories.d.ts +26 -9
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +1 -0
- package/dist/components/MlMeasureTool/MlMeasureTool.d.ts +12 -2
- package/dist/components/MlMeasureTool/MlMeasureTool.stories.d.ts +1 -0
- package/dist/components/MlNavigationCompass/MlNavigationCompass.stories.d.ts +1 -1
- package/dist/components/MlNavigationTools/MlNavigationTools.stories.d.ts +2 -1
- package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +1 -1
- package/dist/components/MlTemporalController/MlTemporalController.stories.d.ts +1 -0
- package/dist/components/MlWmsLoader/MlWmsLoader.d.ts +2 -0
- package/dist/contexts/LayerContext.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.esm.js +750 -546
- package/dist/index.esm.js.map +1 -1
- package/dist/ui_components/LayerList/LayerListItem.d.ts +2 -0
- package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +1 -0
- package/dist/ui_components/LayerList/util/SortableContainer.d.ts +7 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
# Change Log
|
|
2
|
+
## [v0.1.87] - 2023-10-25
|
|
3
|
+
|
|
4
|
+
### Changed
|
|
5
|
+
- 27f1cb2: show measured value in m and in units if measured value is < 0.1km or 0.1mi
|
|
6
|
+
- e606c7c: add catalogue specific demo storybook stories to be able to also provide more useful stories for developers not shown in the catalogue
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
- cb3057f: make layerlist items in layerlistitemfactory sortable via drag & drop
|
|
10
|
+
|
|
2
11
|
## [v0.1.86] - 2023-09-13
|
|
3
12
|
|
|
4
13
|
### Fixed
|
|
@@ -1,10 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { MlFillExtrusionLayerProps } from './MlFillExtrusionLayer';
|
|
3
|
+
declare const storyoptions: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: {
|
|
6
|
+
(props: MlFillExtrusionLayerProps): JSX.Element;
|
|
7
|
+
defaultProps: {
|
|
8
|
+
mapId: undefined;
|
|
9
|
+
paint: {
|
|
10
|
+
"fill-extrusion-color": string;
|
|
11
|
+
"fill-extrusion-height": {
|
|
12
|
+
property: string;
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
"fill-extrusion-base": {
|
|
16
|
+
property: string;
|
|
17
|
+
type: string;
|
|
18
|
+
};
|
|
19
|
+
"fill-extrusion-opacity": number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
argTypes: {};
|
|
24
|
+
decorators: ((Story: any, context: any) => JSX.Element)[];
|
|
25
|
+
};
|
|
1
26
|
export default storyoptions;
|
|
2
|
-
export const ExampleConfig: any;
|
|
3
|
-
declare namespace storyoptions {
|
|
4
|
-
export const title: string;
|
|
5
|
-
export { MlFillExtrusionLayer as component };
|
|
6
|
-
export const argTypes: {};
|
|
7
|
-
export { mapContextDecorator as decorators };
|
|
8
|
-
}
|
|
9
|
-
import MlFillExtrusionLayer from "./MlFillExtrusionLayer";
|
|
10
|
-
import mapContextDecorator from "../../decorators/MapContextDecorator";
|
|
27
|
+
export declare const ExampleConfig: any;
|
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import * as turf from
|
|
2
|
+
import * as turf from '@turf/turf';
|
|
3
|
+
import { GeoJSONObject } from '@turf/turf';
|
|
3
4
|
interface MlMeasureToolProps {
|
|
4
5
|
/**
|
|
5
6
|
* String that specify if the Tool measures an area ("polygon") or length ("line")
|
|
6
7
|
*/
|
|
7
|
-
measureType?:
|
|
8
|
+
measureType?: 'polygon' | 'line';
|
|
8
9
|
/**
|
|
9
10
|
* String that dictates which unit of measurement is used
|
|
10
11
|
*/
|
|
11
12
|
unit?: turf.Units;
|
|
13
|
+
/**
|
|
14
|
+
* Callback function that is called each time measurment geometry within has changed within MlMeasureTool.
|
|
15
|
+
* First parameter is the new GeoJson feature.
|
|
16
|
+
*/
|
|
17
|
+
onChange?: (options: {
|
|
18
|
+
value: number;
|
|
19
|
+
unit: string | undefined;
|
|
20
|
+
geojson: GeoJSONObject;
|
|
21
|
+
}) => void;
|
|
12
22
|
}
|
|
13
23
|
declare const MlMeasureTool: {
|
|
14
24
|
(props: MlMeasureToolProps): JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MlNavigationToolsProps } from
|
|
2
|
+
import { MlNavigationToolsProps } from './MlNavigationTools';
|
|
3
3
|
declare const storyoptions: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: {
|
|
@@ -26,3 +26,4 @@ export declare const AlternativePosition: any;
|
|
|
26
26
|
export declare const NoZoomButtons: any;
|
|
27
27
|
export declare const NoFollowGpsButton: any;
|
|
28
28
|
export declare const CustomButton: any;
|
|
29
|
+
export declare const catalogueDemo: any;
|
|
@@ -37,6 +37,7 @@ export interface MlWmsLoaderProps {
|
|
|
37
37
|
* Id of the target MapLibre instance in mapContext
|
|
38
38
|
*/
|
|
39
39
|
mapId?: string;
|
|
40
|
+
layerId?: string;
|
|
40
41
|
insertBeforeLayer?: string;
|
|
41
42
|
/**
|
|
42
43
|
* URL parameters that will be used in the getCapabilities request
|
|
@@ -88,6 +89,7 @@ export interface MlWmsLoaderProps {
|
|
|
88
89
|
* Custom buttons to display for the WMSLoader
|
|
89
90
|
*/
|
|
90
91
|
buttons?: JSX.Element;
|
|
92
|
+
sortable?: boolean;
|
|
91
93
|
}
|
|
92
94
|
export type LayerType = {
|
|
93
95
|
visible: boolean;
|
|
@@ -38,6 +38,7 @@ export interface LayerContextType {
|
|
|
38
38
|
tileUrl: string;
|
|
39
39
|
moveUp: (layerId: string) => void;
|
|
40
40
|
moveDown: (layerId: string) => void;
|
|
41
|
+
moveLayer: (layerId: string, getNewPos: (oldPos: number) => number) => void;
|
|
41
42
|
}
|
|
42
43
|
declare const LayerContext: React.Context<LayerContextType>;
|
|
43
44
|
declare function LayerContextProvider(props: LayerContextProps): JSX.Element;
|
package/dist/index.d.ts
CHANGED
|
@@ -35,6 +35,7 @@ export { default as MlTemporalController } from "./components/MlTemporalControll
|
|
|
35
35
|
export { default as MlBasicComponent } from "./components/MlBasicComponent.js";
|
|
36
36
|
export { default as MlOrderLayers } from "./components/MlOrderLayers/MlOrderLayers";
|
|
37
37
|
export { default as MlTerrainLayer } from "./components/MlTerrainLayer/MlTerrainLayer";
|
|
38
|
+
export { default as MlSketchTool } from './components/MlSketchTool/MlSketchTool';
|
|
38
39
|
export { default as useCameraFollowPath } from "./hooks/useCameraFollowPath/useCameraFollowPath";
|
|
39
40
|
export { default as useExportMap } from "./hooks/useExportMap";
|
|
40
41
|
export { default as useGpx } from "./hooks/useGpx/useGpx";
|