@carto/ps-react-maps 3.8.0 → 3.9.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/index.js +646 -624
- package/dist/index.js.map +1 -1
- package/dist/types/providers/map/types.d.ts +9 -1
- package/dist/types/types.d.ts +1 -0
- package/package.json +1 -1
|
@@ -3,7 +3,12 @@ import { InstanceRef, MapComponentProps, OverlayRef } from '../../types';
|
|
|
3
3
|
import { SpatialFilter } from '@carto/api-client';
|
|
4
4
|
interface ValueProps {
|
|
5
5
|
id: MapComponentProps['id'];
|
|
6
|
-
|
|
6
|
+
/**
|
|
7
|
+
* The view state of the map.
|
|
8
|
+
* @deprecated Use `initialViewState` instead.
|
|
9
|
+
*/
|
|
10
|
+
viewState?: MapComponentProps['viewState'];
|
|
11
|
+
initialViewState: MapComponentProps['viewState'];
|
|
7
12
|
isLoaded: boolean;
|
|
8
13
|
basemap: NonNullable<MapComponentProps['basemap']>;
|
|
9
14
|
layers?: string[];
|
|
@@ -37,6 +42,8 @@ export interface ViewStateSlice {
|
|
|
37
42
|
viewports: Record<ValueProps['id'], WebMercatorViewport | null>;
|
|
38
43
|
updateViewPort: (id: ValueProps['id']) => void;
|
|
39
44
|
viewStates: Record<ValueProps['id'], ValueProps['viewState']>;
|
|
45
|
+
initialViewStates: Record<ValueProps['id'], ValueProps['viewState']>;
|
|
46
|
+
setInitialViewState: (id: MapComponentProps['id'], viewState: MapViewState) => void;
|
|
40
47
|
setViewState: (id: MapComponentProps['id'], viewState: MapViewState) => void;
|
|
41
48
|
setZoom: (id: MapComponentProps['id'], zoom: MapViewState['zoom']) => void;
|
|
42
49
|
setMinZoom: (id: MapComponentProps['id'], minZoom: MapViewState['minZoom']) => void;
|
|
@@ -47,6 +54,7 @@ export interface CommonSlice {
|
|
|
47
54
|
boundsOptions?: Parameters<WebMercatorViewport['fitBounds']>[1];
|
|
48
55
|
viewStateOptions?: Omit<MapViewState, 'latitude' | 'longitude' | 'zoom'>;
|
|
49
56
|
}) => void;
|
|
57
|
+
resetViewState: (id: ValueProps['id']) => void;
|
|
50
58
|
flyTo: (id: ValueProps['id'], target: {
|
|
51
59
|
longitude?: MapViewState['longitude'];
|
|
52
60
|
latitude?: MapViewState['latitude'];
|
package/dist/types/types.d.ts
CHANGED
|
@@ -54,6 +54,7 @@ export interface ZoomControlChildrenProps {
|
|
|
54
54
|
isLoading: boolean;
|
|
55
55
|
setZoom: (zoom: Parameters<ViewStateSlice['setZoom']>[1]) => void;
|
|
56
56
|
flyTo: (viewState: MapViewState) => void;
|
|
57
|
+
resetViewState: () => void;
|
|
57
58
|
}
|
|
58
59
|
export interface BasemapsControlsProps {
|
|
59
60
|
mapId: MapComponentProps['id'];
|