@tracktor/map 0.5.10 → 0.7.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/dist/components/MarkerMap/MarkerMap.d.ts +1 -1
- package/dist/components/MarkerMap/useMarkerMap.d.ts +4 -3
- package/dist/hooks/useAnimationMap.d.ts +4 -2
- package/dist/hooks/useMarkers.d.ts +2 -3
- package/dist/hooks/useOnMapClick.d.ts +2 -1
- package/dist/hooks/usePopups.d.ts +2 -1
- package/dist/main.js +654 -632
- package/dist/main.umd.cjs +10 -10
- package/dist/types/MarkerMapProps.d.ts +10 -4
- package/dist/utils/{mapOptions.d.ts → getCoreMapOptions.d.ts} +6 -13
- package/package.json +4 -3
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
|
|
3
|
-
declare const _default: import('react').MemoExoticComponent<({ containerStyle, square,
|
|
3
|
+
declare const _default: import('react').MemoExoticComponent<({ containerStyle, square, height, width, ...props }: MarkerMapProps) => ReactElement>;
|
|
4
4
|
export default _default;
|
|
@@ -14,10 +14,11 @@ export declare const DEFAULT_CENTER_LAT = 46.8677;
|
|
|
14
14
|
* - Handles map click events with a provided callback
|
|
15
15
|
* - Supports customizable flyTo behavior, zoom levels, and map style
|
|
16
16
|
*/
|
|
17
|
-
declare const useMarkerMap: ({ markers, loading, center, openPopup, onMapClick,
|
|
17
|
+
declare const useMarkerMap: ({ markers, loading, center, disableAnimation, openPopup, onMapClick, projection, theme, mapStyle, baseMapView, zoom, fitBoundsPadding, zoomFlyFrom, flyToDuration, fitBoundDuration, fitBounds, disableFlyTo, cooperativeGestures, doubleClickZoom, }: MarkerMapProps) => {
|
|
18
|
+
containerRef: import('react').RefObject<string | HTMLDivElement>;
|
|
19
|
+
isMapInitialized: boolean;
|
|
18
20
|
loading: boolean | undefined;
|
|
19
21
|
map: import('react').RefObject<Map | null>;
|
|
20
|
-
|
|
21
|
-
markers: import('../../main').MarkerProps[] | undefined;
|
|
22
|
+
markers: import('../../main').MarkerProps[];
|
|
22
23
|
};
|
|
23
24
|
export default useMarkerMap;
|
|
@@ -4,12 +4,14 @@ import { MarkerProps } from '../types/MarkerProps.ts';
|
|
|
4
4
|
type UseAnimationMapProps = {
|
|
5
5
|
map: RefObject<Map | null>;
|
|
6
6
|
disableFlyTo?: boolean;
|
|
7
|
+
disableAnimation: boolean | undefined;
|
|
7
8
|
flyToDuration?: number;
|
|
8
9
|
zoom?: number;
|
|
9
10
|
fitBounds?: boolean;
|
|
10
|
-
markers?: MarkerProps[];
|
|
11
11
|
fitBoundDuration?: number;
|
|
12
12
|
fitBoundsPadding?: number;
|
|
13
|
+
isMapInitialized: boolean;
|
|
14
|
+
markers?: MarkerProps[];
|
|
13
15
|
};
|
|
14
|
-
declare const useAnimationMap: ({ map, disableFlyTo, flyToDuration, zoom, fitBounds, markers, fitBoundDuration, fitBoundsPadding, }: UseAnimationMapProps) => void;
|
|
16
|
+
declare const useAnimationMap: ({ map, disableFlyTo, disableAnimation, flyToDuration, zoom, fitBounds, markers, fitBoundDuration, fitBoundsPadding, isMapInitialized, }: UseAnimationMapProps) => void;
|
|
15
17
|
export default useAnimationMap;
|
|
@@ -6,8 +6,7 @@ type UseInitializeMapProps = {
|
|
|
6
6
|
map: RefObject<Map | null>;
|
|
7
7
|
markers?: MarkerProps[];
|
|
8
8
|
palette: Palette;
|
|
9
|
-
|
|
10
|
-
markersAreInvalid: boolean;
|
|
9
|
+
isMapInitialized: boolean;
|
|
11
10
|
};
|
|
12
|
-
declare const useMarkers: ({ map, markers,
|
|
11
|
+
declare const useMarkers: ({ map, markers, palette, isMapInitialized }: UseInitializeMapProps) => void;
|
|
13
12
|
export default useMarkers;
|
|
@@ -3,6 +3,7 @@ import { RefObject } from 'react';
|
|
|
3
3
|
type UseCorrectedMapClickProps = {
|
|
4
4
|
map: RefObject<Map | null>;
|
|
5
5
|
onMapClick?: (lng: number, lat: number) => void;
|
|
6
|
+
isMapInitialized?: boolean;
|
|
6
7
|
};
|
|
7
|
-
declare const useCorrectedMapClick: ({ map, onMapClick }: UseCorrectedMapClickProps) => void;
|
|
8
|
+
declare const useCorrectedMapClick: ({ map, onMapClick, isMapInitialized }: UseCorrectedMapClickProps) => void;
|
|
8
9
|
export default useCorrectedMapClick;
|
|
@@ -5,6 +5,7 @@ type UsePopupsProps = {
|
|
|
5
5
|
map: RefObject<Map | null>;
|
|
6
6
|
markers?: MarkerProps[];
|
|
7
7
|
openPopup: string | number | undefined;
|
|
8
|
+
isMapInitialized: boolean;
|
|
8
9
|
};
|
|
9
|
-
declare const usePopups: ({ openPopup, map, markers }: UsePopupsProps) => void;
|
|
10
|
+
declare const usePopups: ({ openPopup, map, markers, isMapInitialized }: UsePopupsProps) => void;
|
|
10
11
|
export default usePopups;
|