@mapcomponents/react-maplibre 0.1.87 → 0.1.88
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 +12 -0
- package/dist/components/MlFollowGps/MlFollowGps.stories.d.ts +2 -1
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.d.ts +8 -0
- package/dist/components/MlGeoJsonLayer/MlGeoJsonLayer.stories.d.ts +1 -0
- package/dist/components/MlLayer/MlLayer.d.ts +3 -2
- package/dist/components/MlScaleReference/MlScaleReference.stories.d.ts +3 -2
- package/dist/contexts/LayerContext.d.ts +15 -2
- package/dist/hooks/useAddImage/useaddImage.cy.d.ts +1 -0
- package/dist/hooks/useAddProtocol/useAddProtocol.stories.d.ts +9 -1
- package/dist/hooks/useFitLayerBounds.d.ts +8 -0
- package/dist/index.esm.js +812 -39
- package/dist/index.esm.js.map +1 -1
- package/dist/omt_styles/bright.d.ts +2495 -0
- package/dist/protocol_handlers/csv.d.ts +8 -0
- package/dist/protocol_handlers/mbtiles.d.ts +2 -2
- package/dist/protocol_handlers/osm.d.ts +11 -0
- package/dist/protocol_handlers/topojson.d.ts +9 -0
- package/dist/protocol_handlers/utils/getProtocolData.d.ts +1 -0
- package/dist/protocol_handlers/utils/protocolPathParser.d.ts +7 -0
- package/dist/protocol_handlers/xml.d.ts +10 -0
- package/dist/ui_components/AddLayerButton/AddLayerButton.d.ts +5 -0
- package/dist/ui_components/AddLayerButton/AddLayerPopup.d.ts +1 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/LayerTypeForm.d.ts +1 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/MbtilesLayerForm.d.ts +13 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/ProtocolHandlerLayerForm.d.ts +10 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/WmsLayerForm.d.ts +2 -1
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/CSVOptionsFomular.d.ts +6 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/MbtilesLayerPropFormular.d.ts +7 -0
- package/dist/ui_components/AddLayerButton/LayerConfigForms/utils/OsmOptionsFomular.d.ts +6 -0
- package/dist/ui_components/DemoDescriptions.d.ts +12 -0
- package/dist/ui_components/LayerList/LayerListItemFactory.d.ts +2 -0
- package/package.json +6 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
|
+
|
|
3
|
+
## [v0.1.88] - 2023-12-22
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- e45ff67: add labelProp and labelOptions to MlGeojsonLayer
|
|
7
|
+
- 5f7d750: add useAddProtocol handlers new formats (csv, osm, tcx, kml, gpx, Topojson)
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
- a5b9d87: fix MlMeasureTool conversion
|
|
11
|
+
- 90befdb: fix compass needle aligment
|
|
12
|
+
- ecb1c48: fix Storybook demos
|
|
13
|
+
|
|
2
14
|
## [v0.1.87] - 2023-10-25
|
|
3
15
|
|
|
4
16
|
### Changed
|
|
@@ -65,6 +65,14 @@ export type MlGeoJsonLayerProps = {
|
|
|
65
65
|
fill?: FillLayerSpecification['paint'];
|
|
66
66
|
line?: LineLayerSpecification['paint'];
|
|
67
67
|
};
|
|
68
|
+
/**
|
|
69
|
+
* Property name in the GeoJSON object to be used as a label.
|
|
70
|
+
*/
|
|
71
|
+
labelProp?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Label configuration options.
|
|
74
|
+
*/
|
|
75
|
+
labelOptions?: useLayerProps['options'];
|
|
68
76
|
/**
|
|
69
77
|
* Hover event handler that is executed whenever a geometry rendered by this component is hovered.
|
|
70
78
|
*/
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import {
|
|
2
|
+
import { useLayerProps } from '../../hooks/useLayer';
|
|
3
|
+
import { Feature, FeatureCollection } from '@turf/turf';
|
|
3
4
|
interface MlLayerProps {
|
|
4
5
|
/**
|
|
5
6
|
* Id of the target MapLibre instance in mapContext
|
|
@@ -17,7 +18,7 @@ interface MlLayerProps {
|
|
|
17
18
|
/**
|
|
18
19
|
* Javascript object that is passed the addLayer command as first parameter.
|
|
19
20
|
*/
|
|
20
|
-
options?:
|
|
21
|
+
options?: useLayerProps['options'];
|
|
21
22
|
/**
|
|
22
23
|
* GeoJSON data that is supposed to be rendered by this component.
|
|
23
24
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { MlScaleReferenceProps } from
|
|
2
|
+
import { MlScaleReferenceProps } from './MlScaleReference';
|
|
3
3
|
declare const storyoptions: {
|
|
4
4
|
title: string;
|
|
5
5
|
component: (props: MlScaleReferenceProps) => JSX.Element;
|
|
@@ -10,5 +10,6 @@ declare const storyoptions: {
|
|
|
10
10
|
decorators: ((Story: any, context: any) => JSX.Element)[];
|
|
11
11
|
};
|
|
12
12
|
export default storyoptions;
|
|
13
|
-
export declare const
|
|
13
|
+
export declare const Toolbar: any;
|
|
14
14
|
export declare const Overlay: any;
|
|
15
|
+
export declare const catalogueDemo: any;
|
|
@@ -1,16 +1,29 @@
|
|
|
1
1
|
import { StyleSpecification } from 'maplibre-gl';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { MlVectorTileLayerProps } from '../components/MlVectorTileLayer/MlVectorTileLayer';
|
|
4
|
-
import { MlWmsLoaderProps } from '../components/MlWmsLoader/MlWmsLoader';
|
|
5
4
|
import { MlGeoJsonLayerProps } from '../components/MlGeoJsonLayer/MlGeoJsonLayer';
|
|
5
|
+
import { Layer } from 'wms-capabilities';
|
|
6
6
|
export interface LayerContextProps {
|
|
7
7
|
children: React.ReactNode;
|
|
8
8
|
}
|
|
9
|
+
export interface wmsLoaderConfigProps {
|
|
10
|
+
getFeatureInfoUrl: string;
|
|
11
|
+
layers: Layer[];
|
|
12
|
+
name: string;
|
|
13
|
+
open: boolean;
|
|
14
|
+
visible: boolean;
|
|
15
|
+
wmsUrl: string;
|
|
16
|
+
}
|
|
17
|
+
export interface wmsConfig {
|
|
18
|
+
featureInfoActive?: boolean;
|
|
19
|
+
config?: wmsLoaderConfigProps;
|
|
20
|
+
url: string;
|
|
21
|
+
}
|
|
9
22
|
export type WmsLayerConfig = {
|
|
10
23
|
type: 'wms';
|
|
11
24
|
name?: string;
|
|
12
25
|
id?: string;
|
|
13
|
-
config:
|
|
26
|
+
config: wmsConfig;
|
|
14
27
|
};
|
|
15
28
|
export type GeojsonLayerConfig = {
|
|
16
29
|
type: 'geojson';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,4 +11,12 @@ declare const storyoptions: {
|
|
|
11
11
|
decorators: ((Story: any, context: any) => JSX.Element)[];
|
|
12
12
|
};
|
|
13
13
|
export default storyoptions;
|
|
14
|
-
export declare const
|
|
14
|
+
export declare const MbTiles: any;
|
|
15
|
+
export declare const CSVOrTSV: any;
|
|
16
|
+
export declare const CSVWithOptions: any;
|
|
17
|
+
export declare const OSM: any;
|
|
18
|
+
export declare const GPX: any;
|
|
19
|
+
export declare const KML: any;
|
|
20
|
+
export declare const TCX: any;
|
|
21
|
+
export declare const Topojson: any;
|
|
22
|
+
export declare const CatalogueDemo: any;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FitBoundsOptions } from 'maplibre-gl';
|
|
2
|
+
export interface useFitLayerBoundsPros {
|
|
3
|
+
layerId: string;
|
|
4
|
+
type: "geojson" | "wms" | "vt";
|
|
5
|
+
fitBoundsOptions?: FitBoundsOptions;
|
|
6
|
+
}
|
|
7
|
+
declare function useFitLayerBounds(props: useFitLayerBoundsPros): void;
|
|
8
|
+
export default useFitLayerBounds;
|