@tracktor/map 1.0.3 → 1.0.5
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/README.md +21 -24
- package/dist/components/MarkerMap/useMarkerMap.d.ts +1 -0
- package/dist/main.js +3694 -3697
- package/dist/main.umd.cjs +76 -76
- package/dist/utils/getFeature.d.ts +1 -1
- package/dist/utils/loadMarkers.d.ts +2 -4
- package/dist/{types → utils}/typeguard.d.ts +8 -0
- package/package.json +1 -1
|
@@ -14,5 +14,5 @@ interface GetFeatureProps {
|
|
|
14
14
|
*
|
|
15
15
|
* @param {GetFeatureProps} options - Configuration params
|
|
16
16
|
*/
|
|
17
|
-
declare const getFeature: ({ map, point }: GetFeatureProps) => (import('mapbox-gl').GeoJSONFeature & import('
|
|
17
|
+
declare const getFeature: ({ map, point }: GetFeatureProps) => (import('mapbox-gl').GeoJSONFeature & import('./typeguard').ClickedFeature) | null | undefined;
|
|
18
18
|
export default getFeature;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Palette
|
|
1
|
+
import { Palette } from '@tracktor/design-system';
|
|
2
2
|
import { Map } from 'mapbox-gl';
|
|
3
3
|
import { ComponentType, RefObject } from 'react';
|
|
4
4
|
import { MarkerProps } from '../types/MarkerProps.ts';
|
|
@@ -19,7 +19,6 @@ export interface CustomMarkerMapProps {
|
|
|
19
19
|
IconComponent?: ComponentType<any>;
|
|
20
20
|
};
|
|
21
21
|
type: string;
|
|
22
|
-
theme?: Theme;
|
|
23
22
|
}
|
|
24
23
|
interface GenerateMarkersProps {
|
|
25
24
|
palette: Palette;
|
|
@@ -29,7 +28,6 @@ interface LoadMarkersProps {
|
|
|
29
28
|
map: RefObject<Map | null>;
|
|
30
29
|
palette: Palette;
|
|
31
30
|
markers: MarkerProps[];
|
|
32
|
-
theme: Theme;
|
|
33
31
|
}
|
|
34
32
|
/**
|
|
35
33
|
* Generates visual styles for map markers based on theme palette and marker type
|
|
@@ -71,5 +69,5 @@ export declare const generateMarkers: ({ palette, type }: GenerateMarkersProps)
|
|
|
71
69
|
* @param {Palette} params.palette - Design system color palette
|
|
72
70
|
* @param {MarkerProps[]} params.markers - Array of marker definitions
|
|
73
71
|
*/
|
|
74
|
-
export declare const loadMarkers: ({ map, palette, markers
|
|
72
|
+
export declare const loadMarkers: ({ map, palette, markers }: LoadMarkersProps) => void;
|
|
75
73
|
export {};
|
|
@@ -12,6 +12,14 @@ export interface ClickedFeature {
|
|
|
12
12
|
properties: FeatureProperties;
|
|
13
13
|
[key: string]: unknown;
|
|
14
14
|
}
|
|
15
|
+
/**
|
|
16
|
+
* Type guard to check if the given geometry is a valid GeoJSON Point geometry
|
|
17
|
+
* @param geometry
|
|
18
|
+
*/
|
|
15
19
|
export declare const isFeatureGeometry: (geometry: unknown) => geometry is GeometryPoint;
|
|
20
|
+
/**
|
|
21
|
+
* Type guard to check if the given feature is a ClickedFeature
|
|
22
|
+
* @param feature
|
|
23
|
+
*/
|
|
16
24
|
export declare const isClickedFeature: (feature: unknown) => feature is ClickedFeature;
|
|
17
25
|
export {};
|
package/package.json
CHANGED