@visitscotland/component-library
Version:
VisitScotland Component Library
66 lines (65 loc) • 3.2 kB
TypeScript
type Viewport = {
bounds: google.maps.LatLngBounds | null;
center: google.maps.LatLng;
zoom: number;
};
export default function useViewportController(): {
getViewport: (gMap: google.maps.Map) => Viewport;
hasViewportChanged: (newViewPort: Viewport) => boolean;
isProgrammaticMove: import('vue').Ref<boolean, boolean>;
isUserMove: import('vue').Ref<boolean, boolean>;
lastSearchViewport: import('vue').Ref<{
bounds: {
contains: (latLng: google.maps.LatLng | google.maps.LatLngLiteral) => boolean;
equals: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null) => boolean;
extend: (point: google.maps.LatLng | google.maps.LatLngLiteral) => google.maps.LatLngBounds;
getCenter: () => google.maps.LatLng;
getNorthEast: () => google.maps.LatLng;
getSouthWest: () => google.maps.LatLng;
intersects: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral) => boolean;
isEmpty: () => boolean;
toJSON: () => google.maps.LatLngBoundsLiteral;
toSpan: () => google.maps.LatLng;
toString: () => string;
toUrlValue: (precision?: number) => string;
union: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral) => google.maps.LatLngBounds;
};
center: {
equals: (other: google.maps.LatLng | google.maps.LatLngLiteral | null | undefined) => boolean;
lat: () => number;
lng: () => number;
toJSON: () => google.maps.LatLngLiteral;
toString: () => string;
toUrlValue: (precision?: number) => string;
};
zoom: number;
}, Viewport | {
bounds: {
contains: (latLng: google.maps.LatLng | google.maps.LatLngLiteral) => boolean;
equals: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral | null) => boolean;
extend: (point: google.maps.LatLng | google.maps.LatLngLiteral) => google.maps.LatLngBounds;
getCenter: () => google.maps.LatLng;
getNorthEast: () => google.maps.LatLng;
getSouthWest: () => google.maps.LatLng;
intersects: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral) => boolean;
isEmpty: () => boolean;
toJSON: () => google.maps.LatLngBoundsLiteral;
toSpan: () => google.maps.LatLng;
toString: () => string;
toUrlValue: (precision?: number) => string;
union: (other: google.maps.LatLngBounds | google.maps.LatLngBoundsLiteral) => google.maps.LatLngBounds;
};
center: {
equals: (other: google.maps.LatLng | google.maps.LatLngLiteral | null | undefined) => boolean;
lat: () => number;
lng: () => number;
toJSON: () => google.maps.LatLngLiteral;
toString: () => string;
toUrlValue: (precision?: number) => string;
};
zoom: number;
}>;
runProgrammaticMove: (fn: Function) => void;
showSearchAreaButton: import('vue').Ref<boolean, boolean>;
};
export {};