@tracktor/map 0.7.1 → 0.8.1
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/useMarkerMap.d.ts +1 -2
- package/dist/hooks/useAnimationMap.d.ts +3 -6
- package/dist/hooks/useMarkers.d.ts +4 -2
- package/dist/main.js +569 -590
- package/dist/main.umd.cjs +10 -10
- package/dist/types/MarkerMapProps.d.ts +4 -12
- package/dist/types/MarkerProps.d.ts +8 -4
- package/dist/utils/getCoreMapOptions.d.ts +1 -4
- package/dist/utils/loadMarkers.d.ts +3 -2
- package/package.json +1 -1
|
@@ -12,9 +12,8 @@ export declare const DEFAULT_CENTER_LAT = 46.8677;
|
|
|
12
12
|
* - Adds popups to specific markers when requested
|
|
13
13
|
* - Adjusts the map center or fits bounds based on markers
|
|
14
14
|
* - Handles map click events with a provided callback
|
|
15
|
-
* - Supports customizable flyTo behavior, zoom levels, and map style
|
|
16
15
|
*/
|
|
17
|
-
declare const useMarkerMap: ({ markers, loading, center, disableAnimation, openPopup, onMapClick, projection, theme, mapStyle, baseMapView, zoom, fitBoundsPadding,
|
|
16
|
+
declare const useMarkerMap: ({ markers, loading, center, disableAnimation, openPopup, onMapClick, projection, theme, mapStyle, fitBoundsAnimationKey, baseMapView, zoom, fitBoundsPadding, fitBoundDuration, fitBounds, cooperativeGestures, doubleClickZoom, }: MarkerMapProps) => {
|
|
18
17
|
containerRef: import('react').RefObject<string | HTMLDivElement>;
|
|
19
18
|
isMapInitialized: boolean;
|
|
20
19
|
loading: boolean | undefined;
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Map } from 'mapbox-gl';
|
|
2
2
|
import { RefObject } from 'react';
|
|
3
3
|
import { MarkerProps } from '../types/MarkerProps.ts';
|
|
4
4
|
type UseAnimationMapProps = {
|
|
5
5
|
map: RefObject<Map | null>;
|
|
6
|
-
disableFlyTo?: boolean;
|
|
7
6
|
disableAnimation: boolean | undefined;
|
|
8
|
-
flyToDuration?: number;
|
|
9
|
-
zoom?: number;
|
|
10
7
|
fitBounds?: boolean;
|
|
11
8
|
fitBoundDuration?: number;
|
|
12
9
|
fitBoundsPadding?: number;
|
|
13
10
|
isMapInitialized: boolean;
|
|
14
11
|
markers?: MarkerProps[];
|
|
15
|
-
|
|
12
|
+
fitBoundsAnimationKey?: unknown;
|
|
16
13
|
};
|
|
17
|
-
declare const useAnimationMap: ({ map,
|
|
14
|
+
declare const useAnimationMap: ({ map, disableAnimation, fitBounds, markers, fitBoundDuration, fitBoundsPadding, isMapInitialized, fitBoundsAnimationKey, }: UseAnimationMapProps) => void;
|
|
18
15
|
export default useAnimationMap;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Palette } from '@tracktor/design-system';
|
|
2
|
-
import { Map } from 'mapbox-gl';
|
|
2
|
+
import { LngLatLike, Map } from 'mapbox-gl';
|
|
3
3
|
import { RefObject } from 'react';
|
|
4
4
|
import { MarkerProps } from '../types/MarkerProps.ts';
|
|
5
5
|
type UseInitializeMapProps = {
|
|
@@ -7,6 +7,8 @@ type UseInitializeMapProps = {
|
|
|
7
7
|
markers?: MarkerProps[];
|
|
8
8
|
palette: Palette;
|
|
9
9
|
isMapInitialized: boolean;
|
|
10
|
+
fitBounds?: boolean;
|
|
11
|
+
center?: LngLatLike | number[];
|
|
10
12
|
};
|
|
11
|
-
declare const useMarkers: ({ map, markers, palette, isMapInitialized }: UseInitializeMapProps) => void;
|
|
13
|
+
declare const useMarkers: ({ map, markers, palette, isMapInitialized, fitBounds, center }: UseInitializeMapProps) => void;
|
|
12
14
|
export default useMarkers;
|