init
This commit is contained in:
475
node_modules/@capacitor/google-maps/dist/typings/definitions.d.ts
generated
vendored
Normal file
475
node_modules/@capacitor/google-maps/dist/typings/definitions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
/**
|
||||
* An interface representing the viewports latitude and longitude bounds.
|
||||
*/
|
||||
export interface LatLngBoundsInterface {
|
||||
southwest: LatLng;
|
||||
center: LatLng;
|
||||
northeast: LatLng;
|
||||
}
|
||||
export declare class LatLngBounds {
|
||||
southwest: LatLng;
|
||||
center: LatLng;
|
||||
northeast: LatLng;
|
||||
constructor(bounds: LatLngBoundsInterface);
|
||||
contains(point: LatLng): Promise<boolean>;
|
||||
extend(point: LatLng): Promise<LatLngBounds>;
|
||||
}
|
||||
/**
|
||||
* An interface representing a pair of latitude and longitude coordinates.
|
||||
*/
|
||||
export interface LatLng {
|
||||
/**
|
||||
* Coordinate latitude, in degrees. This value is in the range [-90, 90].
|
||||
*/
|
||||
lat: number;
|
||||
/**
|
||||
* Coordinate longitude, in degrees. This value is in the range [-180, 180].
|
||||
*/
|
||||
lng: number;
|
||||
}
|
||||
export interface Size {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Polygon options are available as
|
||||
* Polygon extends google.maps.PolygonOptions.
|
||||
* For iOS and Android only the config options declared on Polygon are available.
|
||||
*/
|
||||
export interface Polygon extends google.maps.PolygonOptions {
|
||||
paths?: google.maps.MVCArray<any> | any[];
|
||||
strokeColor?: string;
|
||||
strokeOpacity?: number;
|
||||
strokeWeight?: number;
|
||||
fillColor?: string;
|
||||
fillOpacity?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
/**
|
||||
* Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*/
|
||||
title?: string;
|
||||
tag?: string;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Circle options are available as
|
||||
* Circle extends google.maps.CircleOptions.
|
||||
* For iOS and Android only the config options declared on Circle are available.
|
||||
*/
|
||||
export interface Circle extends google.maps.CircleOptions {
|
||||
fillColor?: string;
|
||||
fillOpacity?: number;
|
||||
strokeColor?: string;
|
||||
strokeWeight?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
/**
|
||||
* Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*/
|
||||
title?: string;
|
||||
tag?: string;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Polyline options are available as
|
||||
* Polyline extends google.maps.PolylineOptions.
|
||||
* For iOS and Android only the config options declared on Polyline are available.
|
||||
*/
|
||||
export interface Polyline extends google.maps.PolylineOptions {
|
||||
strokeColor?: string;
|
||||
strokeOpacity?: number;
|
||||
strokeWeight?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
tag?: string;
|
||||
/**
|
||||
* Used to specify the color of one or more segments of a polyline. The styleSpans property is an array of StyleSpan objects.
|
||||
* Setting the spans property is the preferred way to change the color of a polyline.
|
||||
*
|
||||
* Only on iOS and Android.
|
||||
*/
|
||||
styleSpans?: StyleSpan[];
|
||||
}
|
||||
/**
|
||||
* Describes the style for some region of a polyline.
|
||||
*/
|
||||
export interface StyleSpan {
|
||||
/**
|
||||
* The stroke color. All CSS3 colors are supported except for extended named colors.
|
||||
*/
|
||||
color: string;
|
||||
/**
|
||||
* The length of this span in number of segments.
|
||||
*/
|
||||
segments?: number;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Google Maps options are available as
|
||||
* GoogleMapConfig extends google.maps.MapOptions.
|
||||
* For iOS and Android only the config options declared on GoogleMapConfig are available.
|
||||
*/
|
||||
export interface GoogleMapConfig extends google.maps.MapOptions {
|
||||
/**
|
||||
* Override width for native map.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Override height for native map.
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Override absolute x coordinate position for native map.
|
||||
*/
|
||||
x?: number;
|
||||
/**
|
||||
* Override absolute y coordinate position for native map.
|
||||
*/
|
||||
y?: number;
|
||||
/**
|
||||
* Default location on the Earth towards which the camera points.
|
||||
*/
|
||||
center: LatLng;
|
||||
/**
|
||||
* Sets the zoom of the map.
|
||||
*/
|
||||
zoom: number;
|
||||
/**
|
||||
* Enables image-based lite mode on Android.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
androidLiteMode?: boolean;
|
||||
/**
|
||||
* Override pixel ratio for native map.
|
||||
*/
|
||||
devicePixelRatio?: number;
|
||||
/**
|
||||
* Styles to apply to each of the default map types. Note that for
|
||||
* satellite, hybrid and terrain modes,
|
||||
* these styles will only apply to labels and geometry.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*/
|
||||
styles?: google.maps.MapTypeStyle[] | null;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for Web.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
mapId?: string;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for Android.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
androidMapId?: string;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for iOS.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
iOSMapId?: string;
|
||||
/**
|
||||
* The maximum zoom level which will be displayed on the map. If omitted, or
|
||||
* set to <code>null</code>, the maximum zoom from the current map type is
|
||||
* used instead. Valid zoom values are numbers from zero up to the supported
|
||||
* <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum
|
||||
* zoom level</a>.
|
||||
*/
|
||||
maxZoom?: number | null;
|
||||
/**
|
||||
* The minimum zoom level which will be displayed on the map. If omitted, or
|
||||
* set to <code>null</code>, the minimum zoom from the current map type is
|
||||
* used instead. Valid zoom values are numbers from zero up to the supported
|
||||
* <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum
|
||||
* zoom level</a>.
|
||||
*/
|
||||
minZoom?: number | null;
|
||||
/**
|
||||
* The initial Map mapTypeId. Defaults to <code>ROADMAP</code>.
|
||||
*/
|
||||
mapTypeId?: string | null;
|
||||
/**
|
||||
* The heading for aerial imagery in degrees measured clockwise from
|
||||
* cardinal direction North. Headings are snapped to the nearest available
|
||||
* angle for which imagery is available.
|
||||
*/
|
||||
heading?: number | null;
|
||||
/**
|
||||
* Defines a boundary that restricts the area of the map accessible to
|
||||
* users. When set, a user can only pan and zoom while the camera view stays
|
||||
* inside the limits of the boundary.
|
||||
*/
|
||||
restriction?: google.maps.MapRestriction | null;
|
||||
}
|
||||
/**
|
||||
* Configuration properties for a Google Map Camera
|
||||
*/
|
||||
export interface CameraConfig {
|
||||
/**
|
||||
* Location on the Earth towards which the camera points.
|
||||
*/
|
||||
coordinate?: LatLng;
|
||||
/**
|
||||
* Sets the zoom of the map.
|
||||
*/
|
||||
zoom?: number;
|
||||
/**
|
||||
* Bearing of the camera, in degrees clockwise from true north.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
bearing?: number;
|
||||
/**
|
||||
* The angle, in degrees, of the camera from the nadir (directly facing the Earth).
|
||||
*
|
||||
* The only allowed values are 0 and 45.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
angle?: number;
|
||||
/**
|
||||
* Animate the transition to the new Camera properties.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
animate?: boolean;
|
||||
/**
|
||||
* This configuration option is not being used.
|
||||
*/
|
||||
animationDuration?: number;
|
||||
}
|
||||
export declare enum MapType {
|
||||
/**
|
||||
* Basic map.
|
||||
*/
|
||||
Normal = "Normal",
|
||||
/**
|
||||
* Satellite imagery with roads and labels.
|
||||
*/
|
||||
Hybrid = "Hybrid",
|
||||
/**
|
||||
* Satellite imagery with no labels.
|
||||
*/
|
||||
Satellite = "Satellite",
|
||||
/**
|
||||
* Topographic data.
|
||||
*/
|
||||
Terrain = "Terrain",
|
||||
/**
|
||||
* No base map tiles.
|
||||
*/
|
||||
None = "None"
|
||||
}
|
||||
/**
|
||||
* Controls for setting padding on the 'visible' region of the view.
|
||||
*/
|
||||
export interface MapPadding {
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
}
|
||||
/**
|
||||
* A tile overlay is an image placed on top of your map at a specific zoom level. Available on iOS, Android and Web
|
||||
*/
|
||||
export interface TileOverlay {
|
||||
/**
|
||||
* A string representing the tile url. Should contain `{x}`, `{y}` and `{z}` so they can be replaced with actual values for x, y and zoom. Available on iOS, Android and Web
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The opacity of the tile overlay, between 0 (completely transparent) and 1 inclusive. Available on iOS, Android and Web
|
||||
*
|
||||
* @type {number | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
opacity?: number;
|
||||
/**
|
||||
* Controls whether this tile overlay should be visible. Available only on Android
|
||||
*
|
||||
* @type {boolean | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
visible?: boolean;
|
||||
/**
|
||||
* The zIndex of the tile overlay. Available on iOS and Android
|
||||
*
|
||||
* @type {number | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
zIndex?: number;
|
||||
}
|
||||
/**
|
||||
* A marker is an icon placed at a particular point on the map's surface.
|
||||
*/
|
||||
export interface Marker {
|
||||
/**
|
||||
* Marker position
|
||||
*/
|
||||
coordinate: LatLng;
|
||||
/**
|
||||
* Sets the opacity of the marker, between 0 (completely transparent) and 1 inclusive.
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
opacity?: number;
|
||||
/**
|
||||
* Title, a short description of the overlay.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Snippet text, shown beneath the title in the info window when selected.
|
||||
*/
|
||||
snippet?: string;
|
||||
/**
|
||||
* Controls whether this marker should be flat against the Earth's surface or a billboard facing the camera.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
isFlat?: boolean;
|
||||
/**
|
||||
* Path to a marker icon to render. It can be relative to the web app public directory,
|
||||
* or a https url of a remote marker icon.
|
||||
*
|
||||
* **SVGs are not supported on native platforms.**
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* {
|
||||
* ...
|
||||
* iconUrl: 'assets/icon/pin.png',
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconUrl?: string;
|
||||
/**
|
||||
* Controls the scaled size of the marker image set in `iconUrl`.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconSize?: Size;
|
||||
/**
|
||||
* The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image .
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconOrigin?: Point;
|
||||
/**
|
||||
* The position at which to anchor an image in correspondence to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconAnchor?: Point;
|
||||
/**
|
||||
* Customizes the color of the default marker image. Each value must be between 0 and 255.
|
||||
*
|
||||
* Only for iOS and Android.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
tintColor?: {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
};
|
||||
/**
|
||||
* Controls whether this marker can be dragged interactively
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
draggable?: boolean;
|
||||
/**
|
||||
* Specifies the stack order of this marker, relative to other markers on the map.
|
||||
* A marker with a high z-index is drawn on top of markers with lower z-indexes
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
zIndex?: number;
|
||||
}
|
||||
/**
|
||||
* The callback function to be called when map events are emitted.
|
||||
*/
|
||||
export type MapListenerCallback<T> = (data: T) => void;
|
||||
export interface MapReadyCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
export interface MarkerCallbackData {
|
||||
markerId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
title: string;
|
||||
snippet: string;
|
||||
}
|
||||
export interface PolylineCallbackData {
|
||||
polylineId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface CameraIdleCallbackData {
|
||||
mapId: string;
|
||||
bounds: LatLngBounds;
|
||||
bearing: number;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
tilt: number;
|
||||
zoom: number;
|
||||
}
|
||||
export interface CameraMoveStartedCallbackData {
|
||||
mapId: string;
|
||||
isGesture: boolean;
|
||||
}
|
||||
export interface ClusterClickCallbackData {
|
||||
mapId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
size: number;
|
||||
items: MarkerCallbackData[];
|
||||
}
|
||||
export interface MapClickCallbackData {
|
||||
mapId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
export interface MarkerClickCallbackData extends MarkerCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
export interface PolygonClickCallbackData {
|
||||
mapId: string;
|
||||
polygonId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface CircleClickCallbackData {
|
||||
mapId: string;
|
||||
circleId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface MyLocationButtonClickCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
211
node_modules/@capacitor/google-maps/dist/typings/implementation.d.ts
generated
vendored
Normal file
211
node_modules/@capacitor/google-maps/dist/typings/implementation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
import type { Plugin } from '@capacitor/core';
|
||||
import type { CameraConfig, Circle, GoogleMapConfig, LatLng, LatLngBounds, MapPadding, MapType, Marker, Polygon, Polyline, TileOverlay } from './definitions';
|
||||
/**
|
||||
* An interface containing the options used when creating a map.
|
||||
*/
|
||||
export interface CreateMapArgs {
|
||||
/**
|
||||
* A unique identifier for the map instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The Google Maps SDK API Key.
|
||||
*/
|
||||
apiKey: string;
|
||||
/**
|
||||
* The initial configuration settings for the map.
|
||||
*/
|
||||
config: GoogleMapConfig;
|
||||
/**
|
||||
* The DOM element that the Google Map View will be mounted on which determines size and positioning.
|
||||
*/
|
||||
element: HTMLElement;
|
||||
/**
|
||||
* Destroy and re-create the map instance if a map with the supplied id already exists
|
||||
* @default false
|
||||
*/
|
||||
forceCreate?: boolean;
|
||||
/**
|
||||
* The region parameter alters your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region).
|
||||
*
|
||||
* Only available for web.
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
* The language parameter affects the names of controls, copyright notices, driving directions, and control labels, as well as the responses to service requests.
|
||||
*
|
||||
* Only available for web.
|
||||
*/
|
||||
language?: string;
|
||||
}
|
||||
export interface DestroyMapArgs {
|
||||
id: string;
|
||||
}
|
||||
export interface RemoveMarkerArgs {
|
||||
id: string;
|
||||
markerId: string;
|
||||
}
|
||||
export interface RemoveMarkersArgs {
|
||||
id: string;
|
||||
markerIds: string[];
|
||||
}
|
||||
export interface AddMarkerArgs {
|
||||
id: string;
|
||||
marker: Marker;
|
||||
}
|
||||
export interface AddPolygonsArgs {
|
||||
id: string;
|
||||
polygons: Polygon[];
|
||||
}
|
||||
export interface RemovePolygonsArgs {
|
||||
id: string;
|
||||
polygonIds: string[];
|
||||
}
|
||||
export interface AddCirclesArgs {
|
||||
id: string;
|
||||
circles: Circle[];
|
||||
}
|
||||
export interface RemoveCirclesArgs {
|
||||
id: string;
|
||||
circleIds: string[];
|
||||
}
|
||||
export interface AddPolylinesArgs {
|
||||
id: string;
|
||||
polylines: Polyline[];
|
||||
}
|
||||
export interface RemovePolylinesArgs {
|
||||
id: string;
|
||||
polylineIds: string[];
|
||||
}
|
||||
export interface CameraArgs {
|
||||
id: string;
|
||||
config: CameraConfig;
|
||||
}
|
||||
export interface MapTypeArgs {
|
||||
id: string;
|
||||
mapType: MapType;
|
||||
}
|
||||
export interface IndoorMapArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface RemoveTileOverlayArgs {
|
||||
id: string;
|
||||
tileOverlayId: string;
|
||||
}
|
||||
export interface AddTileOverlayArgs {
|
||||
id: string;
|
||||
tileOverlay: TileOverlay;
|
||||
}
|
||||
export interface TrafficLayerArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface AccElementsArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface PaddingArgs {
|
||||
id: string;
|
||||
padding: MapPadding;
|
||||
}
|
||||
export interface CurrentLocArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface AddMarkersArgs {
|
||||
id: string;
|
||||
markers: Marker[];
|
||||
}
|
||||
export interface MapBoundsArgs {
|
||||
id: string;
|
||||
mapBounds: {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
export interface MapBoundsContainsArgs {
|
||||
bounds: LatLngBounds;
|
||||
point: LatLng;
|
||||
}
|
||||
export type MapBoundsExtendArgs = MapBoundsContainsArgs;
|
||||
export interface EnableClusteringArgs {
|
||||
id: string;
|
||||
minClusterSize?: number;
|
||||
}
|
||||
export interface FitBoundsArgs {
|
||||
id: string;
|
||||
bounds: LatLngBounds;
|
||||
padding?: number;
|
||||
}
|
||||
export interface CapacitorGoogleMapsPlugin extends Plugin {
|
||||
create(options: CreateMapArgs): Promise<void>;
|
||||
enableTouch(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
disableTouch(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
addTileOverlay(args: AddTileOverlayArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(args: RemoveTileOverlayArgs): Promise<void>;
|
||||
addMarker(args: AddMarkerArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
addMarkers(args: AddMarkersArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeMarker(args: RemoveMarkerArgs): Promise<void>;
|
||||
removeMarkers(args: RemoveMarkersArgs): Promise<void>;
|
||||
addPolygons(args: AddPolygonsArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolygons(args: RemovePolygonsArgs): Promise<void>;
|
||||
addCircles(args: AddCirclesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeCircles(args: RemoveCirclesArgs): Promise<void>;
|
||||
addPolylines(args: AddPolylinesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolylines(args: RemovePolylinesArgs): Promise<void>;
|
||||
enableClustering(args: EnableClusteringArgs): Promise<void>;
|
||||
disableClustering(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
destroy(args: DestroyMapArgs): Promise<void>;
|
||||
setCamera(args: CameraArgs): Promise<void>;
|
||||
getMapType(args: {
|
||||
id: string;
|
||||
}): Promise<{
|
||||
type: string;
|
||||
}>;
|
||||
setMapType(args: MapTypeArgs): Promise<void>;
|
||||
enableIndoorMaps(args: IndoorMapArgs): Promise<void>;
|
||||
enableTrafficLayer(args: TrafficLayerArgs): Promise<void>;
|
||||
enableAccessibilityElements(args: AccElementsArgs): Promise<void>;
|
||||
enableCurrentLocation(args: CurrentLocArgs): Promise<void>;
|
||||
setPadding(args: PaddingArgs): Promise<void>;
|
||||
onScroll(args: MapBoundsArgs): Promise<void>;
|
||||
onResize(args: MapBoundsArgs): Promise<void>;
|
||||
onDisplay(args: MapBoundsArgs): Promise<void>;
|
||||
dispatchMapEvent(args: {
|
||||
id: string;
|
||||
focus: boolean;
|
||||
}): Promise<void>;
|
||||
getMapBounds(args: {
|
||||
id: string;
|
||||
}): Promise<LatLngBounds>;
|
||||
fitBounds(args: FitBoundsArgs): Promise<void>;
|
||||
mapBoundsContains(args: MapBoundsContainsArgs): Promise<{
|
||||
contains: boolean;
|
||||
}>;
|
||||
mapBoundsExtend(args: MapBoundsExtendArgs): Promise<{
|
||||
bounds: LatLngBounds;
|
||||
}>;
|
||||
}
|
||||
declare const CapacitorGoogleMaps: CapacitorGoogleMapsPlugin;
|
||||
export { CapacitorGoogleMaps };
|
||||
10
node_modules/@capacitor/google-maps/dist/typings/index.d.ts
generated
vendored
Normal file
10
node_modules/@capacitor/google-maps/dist/typings/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { LatLngBounds, MapType, Marker, Polygon, Circle, Polyline, StyleSpan } from './definitions';
|
||||
import { GoogleMap } from './map';
|
||||
export { GoogleMap, LatLngBounds, MapType, Marker, Polygon, Circle, Polyline, StyleSpan };
|
||||
declare global {
|
||||
export namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'capacitor-google-map': any;
|
||||
}
|
||||
}
|
||||
}
|
||||
360
node_modules/@capacitor/google-maps/dist/typings/map.d.ts
generated
vendored
Normal file
360
node_modules/@capacitor/google-maps/dist/typings/map.d.ts
generated
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
import type { CameraConfig, Marker, MapPadding, MapListenerCallback, MapReadyCallbackData, CameraIdleCallbackData, CameraMoveStartedCallbackData, ClusterClickCallbackData, MapClickCallbackData, MarkerClickCallbackData, MyLocationButtonClickCallbackData, Polygon, PolygonClickCallbackData, Circle, CircleClickCallbackData, Polyline, PolylineCallbackData, TileOverlay } from './definitions';
|
||||
import { LatLngBounds, MapType } from './definitions';
|
||||
import type { CreateMapArgs } from './implementation';
|
||||
export interface GoogleMapInterface {
|
||||
create(options: CreateMapArgs, callback?: MapListenerCallback<MapReadyCallbackData>): Promise<GoogleMap>;
|
||||
enableTouch(): Promise<void>;
|
||||
disableTouch(): Promise<void>;
|
||||
enableClustering(
|
||||
/**
|
||||
* The minimum number of markers that can be clustered together. The default is 4 markers.
|
||||
*/
|
||||
minClusterSize?: number): Promise<void>;
|
||||
disableClustering(): Promise<void>;
|
||||
addTileOverlay(tileOverlay: TileOverlay): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(id: string): Promise<void>;
|
||||
addMarker(marker: Marker): Promise<string>;
|
||||
addMarkers(markers: Marker[]): Promise<string[]>;
|
||||
removeMarker(id: string): Promise<void>;
|
||||
removeMarkers(ids: string[]): Promise<void>;
|
||||
addPolygons(polygons: Polygon[]): Promise<string[]>;
|
||||
removePolygons(ids: string[]): Promise<void>;
|
||||
addCircles(circles: Circle[]): Promise<string[]>;
|
||||
removeCircles(ids: string[]): Promise<void>;
|
||||
addPolylines(polylines: Polyline[]): Promise<string[]>;
|
||||
removePolylines(ids: string[]): Promise<void>;
|
||||
destroy(): Promise<void>;
|
||||
setCamera(config: CameraConfig): Promise<void>;
|
||||
/**
|
||||
* Get current map type
|
||||
*/
|
||||
getMapType(): Promise<MapType>;
|
||||
setMapType(mapType: MapType): Promise<void>;
|
||||
enableIndoorMaps(enabled: boolean): Promise<void>;
|
||||
enableTrafficLayer(enabled: boolean): Promise<void>;
|
||||
enableAccessibilityElements(enabled: boolean): Promise<void>;
|
||||
enableCurrentLocation(enabled: boolean): Promise<void>;
|
||||
setPadding(padding: MapPadding): Promise<void>;
|
||||
/**
|
||||
* Get the map's current viewport latitude and longitude bounds.
|
||||
*
|
||||
* @returns {LatLngBounds}
|
||||
*/
|
||||
getMapBounds(): Promise<LatLngBounds>;
|
||||
/**
|
||||
* Sets the map viewport to contain the given bounds.
|
||||
* @param bounds The bounds to fit in the viewport.
|
||||
* @param padding Optional padding to apply in pixels. The bounds will be fit in the part of the map that remains after padding is removed.
|
||||
*/
|
||||
fitBounds(bounds: LatLngBounds, padding?: number): Promise<void>;
|
||||
setOnBoundsChangedListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
setOnCameraIdleListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
setOnCameraMoveStartedListener(callback?: MapListenerCallback<CameraMoveStartedCallbackData>): Promise<void>;
|
||||
setOnClusterClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
setOnClusterInfoWindowClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
setOnInfoWindowClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMapClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
setOnMarkerClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnPolygonClickListener(callback?: MapListenerCallback<PolygonClickCallbackData>): Promise<void>;
|
||||
setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData>): Promise<void>;
|
||||
setOnPolylineClickListener(callback?: MapListenerCallback<PolylineCallbackData>): Promise<void>;
|
||||
setOnMarkerDragStartListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMarkerDragListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMarkerDragEndListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMyLocationButtonClickListener(callback?: MapListenerCallback<MyLocationButtonClickCallbackData>): Promise<void>;
|
||||
setOnMyLocationClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
}
|
||||
export declare class GoogleMap {
|
||||
private id;
|
||||
private element;
|
||||
private resizeObserver;
|
||||
private onBoundsChangedListener?;
|
||||
private onCameraIdleListener?;
|
||||
private onCameraMoveStartedListener?;
|
||||
private onClusterClickListener?;
|
||||
private onClusterInfoWindowClickListener?;
|
||||
private onInfoWindowClickListener?;
|
||||
private onMapClickListener?;
|
||||
private onPolylineClickListener?;
|
||||
private onMarkerClickListener?;
|
||||
private onPolygonClickListener?;
|
||||
private onCircleClickListener?;
|
||||
private onMarkerDragStartListener?;
|
||||
private onMarkerDragListener?;
|
||||
private onMarkerDragEndListener?;
|
||||
private onMyLocationButtonClickListener?;
|
||||
private onMyLocationClickListener?;
|
||||
private constructor();
|
||||
/**
|
||||
* Creates a new instance of a Google Map
|
||||
* @param options
|
||||
* @param callback
|
||||
* @returns GoogleMap
|
||||
*/
|
||||
static create(options: CreateMapArgs, callback?: MapListenerCallback<MapReadyCallbackData>): Promise<GoogleMap>;
|
||||
private static getElementBounds;
|
||||
/**
|
||||
* Enable touch events on native map
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
enableTouch(): Promise<void>;
|
||||
/**
|
||||
* Disable touch events on native map
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
disableTouch(): Promise<void>;
|
||||
/**
|
||||
* Enable marker clustering
|
||||
*
|
||||
* @param minClusterSize - The minimum number of markers that can be clustered together.
|
||||
* @defaultValue 4
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
enableClustering(minClusterSize?: number): Promise<void>;
|
||||
/**
|
||||
* Disable marker clustering
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
disableClustering(): Promise<void>;
|
||||
/**
|
||||
* Adds a tile overlay to the map
|
||||
*
|
||||
* @param tileOverlay
|
||||
* @returns created tile overlay id
|
||||
*/
|
||||
addTileOverlay(tileOverlay: TileOverlay): Promise<string>;
|
||||
/**
|
||||
* Removes a tile overlay from the map
|
||||
*
|
||||
* @param id of the tile overlay to remove from the map
|
||||
* @returns void
|
||||
*/
|
||||
removeTileOverlay(id: string): Promise<void>;
|
||||
/**
|
||||
* Adds a marker to the map
|
||||
*
|
||||
* @param marker
|
||||
* @returns created marker id
|
||||
*/
|
||||
addMarker(marker: Marker): Promise<string>;
|
||||
/**
|
||||
* Adds multiple markers to the map
|
||||
*
|
||||
* @param markers
|
||||
* @returns array of created marker IDs
|
||||
*/
|
||||
addMarkers(markers: Marker[]): Promise<string[]>;
|
||||
/**
|
||||
* Remove marker from the map
|
||||
*
|
||||
* @param id id of the marker to remove from the map
|
||||
* @returns
|
||||
*/
|
||||
removeMarker(id: string): Promise<void>;
|
||||
/**
|
||||
* Remove markers from the map
|
||||
*
|
||||
* @param ids array of ids to remove from the map
|
||||
* @returns
|
||||
*/
|
||||
removeMarkers(ids: string[]): Promise<void>;
|
||||
addPolygons(polygons: Polygon[]): Promise<string[]>;
|
||||
addPolylines(polylines: Polyline[]): Promise<string[]>;
|
||||
removePolygons(ids: string[]): Promise<void>;
|
||||
addCircles(circles: Circle[]): Promise<string[]>;
|
||||
removeCircles(ids: string[]): Promise<void>;
|
||||
removePolylines(ids: string[]): Promise<void>;
|
||||
/**
|
||||
* Destroy the current instance of the map
|
||||
*/
|
||||
destroy(): Promise<void>;
|
||||
/**
|
||||
* Update the map camera configuration
|
||||
*
|
||||
* @param config
|
||||
* @returns
|
||||
*/
|
||||
setCamera(config: CameraConfig): Promise<void>;
|
||||
getMapType(): Promise<MapType>;
|
||||
/**
|
||||
* Sets the type of map tiles that should be displayed.
|
||||
*
|
||||
* @param mapType
|
||||
* @returns
|
||||
*/
|
||||
setMapType(mapType: MapType): Promise<void>;
|
||||
/**
|
||||
* Sets whether indoor maps are shown, where available.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableIndoorMaps(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Controls whether the map is drawing traffic data, if available.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableTrafficLayer(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Show accessibility elements for overlay objects, such as Marker and Polyline.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableAccessibilityElements(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Set whether the My Location dot and accuracy circle is enabled.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableCurrentLocation(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Set padding on the 'visible' region of the view.
|
||||
*
|
||||
* @param padding
|
||||
* @returns
|
||||
*/
|
||||
setPadding(padding: MapPadding): Promise<void>;
|
||||
/**
|
||||
* Get the map's current viewport latitude and longitude bounds.
|
||||
*
|
||||
* @returns {LatLngBounds}
|
||||
*/
|
||||
getMapBounds(): Promise<LatLngBounds>;
|
||||
fitBounds(bounds: LatLngBounds, padding?: number): Promise<void>;
|
||||
initScrolling(): void;
|
||||
disableScrolling(): void;
|
||||
handleScrollEvent: () => void;
|
||||
private updateMapBounds;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCameraIdle' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCameraIdleListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onBoundsChanged' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnBoundsChangedListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCameraMoveStarted' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCameraMoveStartedListener(callback?: MapListenerCallback<CameraMoveStartedCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onClusterClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnClusterClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onClusterInfoWindowClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnClusterInfoWindowClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onInfoWindowClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnInfoWindowClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMapClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMapClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onPolygonClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnPolygonClickListener(callback?: MapListenerCallback<PolygonClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCircleClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onPolylineClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnPolylineClickListener(callback?: MapListenerCallback<PolylineCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDragStart' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragStartListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDrag' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDragEnd' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragEndListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMyLocationButtonClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMyLocationButtonClickListener(callback?: MapListenerCallback<MyLocationButtonClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMyLocationClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMyLocationClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Remove all event listeners on the map.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
removeAllMapListeners(): Promise<void>;
|
||||
private generateCallback;
|
||||
}
|
||||
475
node_modules/@capacitor/google-maps/dist/typings/ts_old/definitions.d.ts
generated
vendored
Normal file
475
node_modules/@capacitor/google-maps/dist/typings/ts_old/definitions.d.ts
generated
vendored
Normal file
@@ -0,0 +1,475 @@
|
||||
/**
|
||||
* An interface representing the viewports latitude and longitude bounds.
|
||||
*/
|
||||
export interface LatLngBoundsInterface {
|
||||
southwest: LatLng;
|
||||
center: LatLng;
|
||||
northeast: LatLng;
|
||||
}
|
||||
export declare class LatLngBounds {
|
||||
southwest: LatLng;
|
||||
center: LatLng;
|
||||
northeast: LatLng;
|
||||
constructor(bounds: LatLngBoundsInterface);
|
||||
contains(point: LatLng): Promise<boolean>;
|
||||
extend(point: LatLng): Promise<LatLngBounds>;
|
||||
}
|
||||
/**
|
||||
* An interface representing a pair of latitude and longitude coordinates.
|
||||
*/
|
||||
export interface LatLng {
|
||||
/**
|
||||
* Coordinate latitude, in degrees. This value is in the range [-90, 90].
|
||||
*/
|
||||
lat: number;
|
||||
/**
|
||||
* Coordinate longitude, in degrees. This value is in the range [-180, 180].
|
||||
*/
|
||||
lng: number;
|
||||
}
|
||||
export interface Size {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export interface Point {
|
||||
x: number;
|
||||
y: number;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Polygon options are available as
|
||||
* Polygon extends google.maps.PolygonOptions.
|
||||
* For iOS and Android only the config options declared on Polygon are available.
|
||||
*/
|
||||
export interface Polygon extends google.maps.PolygonOptions {
|
||||
paths?: google.maps.MVCArray<any> | any[];
|
||||
strokeColor?: string;
|
||||
strokeOpacity?: number;
|
||||
strokeWeight?: number;
|
||||
fillColor?: string;
|
||||
fillOpacity?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
/**
|
||||
* Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*/
|
||||
title?: string;
|
||||
tag?: string;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Circle options are available as
|
||||
* Circle extends google.maps.CircleOptions.
|
||||
* For iOS and Android only the config options declared on Circle are available.
|
||||
*/
|
||||
export interface Circle extends google.maps.CircleOptions {
|
||||
fillColor?: string;
|
||||
fillOpacity?: number;
|
||||
strokeColor?: string;
|
||||
strokeWeight?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
/**
|
||||
* Title, a short description of the overlay. Some overlays, such as markers, will display the title on the map. The title is also the default accessibility text.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*/
|
||||
title?: string;
|
||||
tag?: string;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Polyline options are available as
|
||||
* Polyline extends google.maps.PolylineOptions.
|
||||
* For iOS and Android only the config options declared on Polyline are available.
|
||||
*/
|
||||
export interface Polyline extends google.maps.PolylineOptions {
|
||||
strokeColor?: string;
|
||||
strokeOpacity?: number;
|
||||
strokeWeight?: number;
|
||||
geodesic?: boolean;
|
||||
clickable?: boolean;
|
||||
tag?: string;
|
||||
/**
|
||||
* Used to specify the color of one or more segments of a polyline. The styleSpans property is an array of StyleSpan objects.
|
||||
* Setting the spans property is the preferred way to change the color of a polyline.
|
||||
*
|
||||
* Only on iOS and Android.
|
||||
*/
|
||||
styleSpans?: StyleSpan[];
|
||||
}
|
||||
/**
|
||||
* Describes the style for some region of a polyline.
|
||||
*/
|
||||
export interface StyleSpan {
|
||||
/**
|
||||
* The stroke color. All CSS3 colors are supported except for extended named colors.
|
||||
*/
|
||||
color: string;
|
||||
/**
|
||||
* The length of this span in number of segments.
|
||||
*/
|
||||
segments?: number;
|
||||
}
|
||||
/**
|
||||
* For web, all the javascript Google Maps options are available as
|
||||
* GoogleMapConfig extends google.maps.MapOptions.
|
||||
* For iOS and Android only the config options declared on GoogleMapConfig are available.
|
||||
*/
|
||||
export interface GoogleMapConfig extends google.maps.MapOptions {
|
||||
/**
|
||||
* Override width for native map.
|
||||
*/
|
||||
width?: number;
|
||||
/**
|
||||
* Override height for native map.
|
||||
*/
|
||||
height?: number;
|
||||
/**
|
||||
* Override absolute x coordinate position for native map.
|
||||
*/
|
||||
x?: number;
|
||||
/**
|
||||
* Override absolute y coordinate position for native map.
|
||||
*/
|
||||
y?: number;
|
||||
/**
|
||||
* Default location on the Earth towards which the camera points.
|
||||
*/
|
||||
center: LatLng;
|
||||
/**
|
||||
* Sets the zoom of the map.
|
||||
*/
|
||||
zoom: number;
|
||||
/**
|
||||
* Enables image-based lite mode on Android.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
androidLiteMode?: boolean;
|
||||
/**
|
||||
* Override pixel ratio for native map.
|
||||
*/
|
||||
devicePixelRatio?: number;
|
||||
/**
|
||||
* Styles to apply to each of the default map types. Note that for
|
||||
* satellite, hybrid and terrain modes,
|
||||
* these styles will only apply to labels and geometry.
|
||||
*
|
||||
* @since 4.3.0
|
||||
*/
|
||||
styles?: google.maps.MapTypeStyle[] | null;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for Web.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
mapId?: string;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for Android.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
androidMapId?: string;
|
||||
/**
|
||||
* A map id associated with a specific map style or feature.
|
||||
*
|
||||
* [Use Map IDs](https://developers.google.com/maps/documentation/get-map-id)
|
||||
*
|
||||
* Only for iOS.
|
||||
*
|
||||
* @since 5.4.0
|
||||
*/
|
||||
iOSMapId?: string;
|
||||
/**
|
||||
* The maximum zoom level which will be displayed on the map. If omitted, or
|
||||
* set to <code>null</code>, the maximum zoom from the current map type is
|
||||
* used instead. Valid zoom values are numbers from zero up to the supported
|
||||
* <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum
|
||||
* zoom level</a>.
|
||||
*/
|
||||
maxZoom?: number | null;
|
||||
/**
|
||||
* The minimum zoom level which will be displayed on the map. If omitted, or
|
||||
* set to <code>null</code>, the minimum zoom from the current map type is
|
||||
* used instead. Valid zoom values are numbers from zero up to the supported
|
||||
* <a
|
||||
* href="https://developers.google.com/maps/documentation/javascript/maxzoom">maximum
|
||||
* zoom level</a>.
|
||||
*/
|
||||
minZoom?: number | null;
|
||||
/**
|
||||
* The initial Map mapTypeId. Defaults to <code>ROADMAP</code>.
|
||||
*/
|
||||
mapTypeId?: string | null;
|
||||
/**
|
||||
* The heading for aerial imagery in degrees measured clockwise from
|
||||
* cardinal direction North. Headings are snapped to the nearest available
|
||||
* angle for which imagery is available.
|
||||
*/
|
||||
heading?: number | null;
|
||||
/**
|
||||
* Defines a boundary that restricts the area of the map accessible to
|
||||
* users. When set, a user can only pan and zoom while the camera view stays
|
||||
* inside the limits of the boundary.
|
||||
*/
|
||||
restriction?: google.maps.MapRestriction | null;
|
||||
}
|
||||
/**
|
||||
* Configuration properties for a Google Map Camera
|
||||
*/
|
||||
export interface CameraConfig {
|
||||
/**
|
||||
* Location on the Earth towards which the camera points.
|
||||
*/
|
||||
coordinate?: LatLng;
|
||||
/**
|
||||
* Sets the zoom of the map.
|
||||
*/
|
||||
zoom?: number;
|
||||
/**
|
||||
* Bearing of the camera, in degrees clockwise from true north.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
bearing?: number;
|
||||
/**
|
||||
* The angle, in degrees, of the camera from the nadir (directly facing the Earth).
|
||||
*
|
||||
* The only allowed values are 0 and 45.
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
angle?: number;
|
||||
/**
|
||||
* Animate the transition to the new Camera properties.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
animate?: boolean;
|
||||
/**
|
||||
* This configuration option is not being used.
|
||||
*/
|
||||
animationDuration?: number;
|
||||
}
|
||||
export declare enum MapType {
|
||||
/**
|
||||
* Basic map.
|
||||
*/
|
||||
Normal = "Normal",
|
||||
/**
|
||||
* Satellite imagery with roads and labels.
|
||||
*/
|
||||
Hybrid = "Hybrid",
|
||||
/**
|
||||
* Satellite imagery with no labels.
|
||||
*/
|
||||
Satellite = "Satellite",
|
||||
/**
|
||||
* Topographic data.
|
||||
*/
|
||||
Terrain = "Terrain",
|
||||
/**
|
||||
* No base map tiles.
|
||||
*/
|
||||
None = "None"
|
||||
}
|
||||
/**
|
||||
* Controls for setting padding on the 'visible' region of the view.
|
||||
*/
|
||||
export interface MapPadding {
|
||||
top: number;
|
||||
left: number;
|
||||
right: number;
|
||||
bottom: number;
|
||||
}
|
||||
/**
|
||||
* A tile overlay is an image placed on top of your map at a specific zoom level. Available on iOS, Android and Web
|
||||
*/
|
||||
export interface TileOverlay {
|
||||
/**
|
||||
* A string representing the tile url. Should contain `{x}`, `{y}` and `{z}` so they can be replaced with actual values for x, y and zoom. Available on iOS, Android and Web
|
||||
*
|
||||
* @type {string}
|
||||
*/
|
||||
url: string;
|
||||
/**
|
||||
* The opacity of the tile overlay, between 0 (completely transparent) and 1 inclusive. Available on iOS, Android and Web
|
||||
*
|
||||
* @type {number | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
opacity?: number;
|
||||
/**
|
||||
* Controls whether this tile overlay should be visible. Available only on Android
|
||||
*
|
||||
* @type {boolean | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
visible?: boolean;
|
||||
/**
|
||||
* The zIndex of the tile overlay. Available on iOS and Android
|
||||
*
|
||||
* @type {number | undefined}
|
||||
* @default undefined
|
||||
*/
|
||||
zIndex?: number;
|
||||
}
|
||||
/**
|
||||
* A marker is an icon placed at a particular point on the map's surface.
|
||||
*/
|
||||
export interface Marker {
|
||||
/**
|
||||
* Marker position
|
||||
*/
|
||||
coordinate: LatLng;
|
||||
/**
|
||||
* Sets the opacity of the marker, between 0 (completely transparent) and 1 inclusive.
|
||||
*
|
||||
* @default 1
|
||||
*/
|
||||
opacity?: number;
|
||||
/**
|
||||
* Title, a short description of the overlay.
|
||||
*/
|
||||
title?: string;
|
||||
/**
|
||||
* Snippet text, shown beneath the title in the info window when selected.
|
||||
*/
|
||||
snippet?: string;
|
||||
/**
|
||||
* Controls whether this marker should be flat against the Earth's surface or a billboard facing the camera.
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
isFlat?: boolean;
|
||||
/**
|
||||
* Path to a marker icon to render. It can be relative to the web app public directory,
|
||||
* or a https url of a remote marker icon.
|
||||
*
|
||||
* **SVGs are not supported on native platforms.**
|
||||
*
|
||||
* @usage
|
||||
* ```typescript
|
||||
* {
|
||||
* ...
|
||||
* iconUrl: 'assets/icon/pin.png',
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconUrl?: string;
|
||||
/**
|
||||
* Controls the scaled size of the marker image set in `iconUrl`.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconSize?: Size;
|
||||
/**
|
||||
* The position of the image within a sprite, if any. By default, the origin is located at the top left corner of the image .
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconOrigin?: Point;
|
||||
/**
|
||||
* The position at which to anchor an image in correspondence to the location of the marker on the map. By default, the anchor is located along the center point of the bottom of the image.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
iconAnchor?: Point;
|
||||
/**
|
||||
* Customizes the color of the default marker image. Each value must be between 0 and 255.
|
||||
*
|
||||
* Only for iOS and Android.
|
||||
*
|
||||
* @since 4.2.0
|
||||
*/
|
||||
tintColor?: {
|
||||
r: number;
|
||||
g: number;
|
||||
b: number;
|
||||
a: number;
|
||||
};
|
||||
/**
|
||||
* Controls whether this marker can be dragged interactively
|
||||
*
|
||||
* @default false
|
||||
*/
|
||||
draggable?: boolean;
|
||||
/**
|
||||
* Specifies the stack order of this marker, relative to other markers on the map.
|
||||
* A marker with a high z-index is drawn on top of markers with lower z-indexes
|
||||
*
|
||||
* @default 0
|
||||
*/
|
||||
zIndex?: number;
|
||||
}
|
||||
/**
|
||||
* The callback function to be called when map events are emitted.
|
||||
*/
|
||||
export type MapListenerCallback<T> = (data: T) => void;
|
||||
export interface MapReadyCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
export interface MarkerCallbackData {
|
||||
markerId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
title: string;
|
||||
snippet: string;
|
||||
}
|
||||
export interface PolylineCallbackData {
|
||||
polylineId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface CameraIdleCallbackData {
|
||||
mapId: string;
|
||||
bounds: LatLngBounds;
|
||||
bearing: number;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
tilt: number;
|
||||
zoom: number;
|
||||
}
|
||||
export interface CameraMoveStartedCallbackData {
|
||||
mapId: string;
|
||||
isGesture: boolean;
|
||||
}
|
||||
export interface ClusterClickCallbackData {
|
||||
mapId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
size: number;
|
||||
items: MarkerCallbackData[];
|
||||
}
|
||||
export interface MapClickCallbackData {
|
||||
mapId: string;
|
||||
latitude: number;
|
||||
longitude: number;
|
||||
}
|
||||
export interface MarkerClickCallbackData extends MarkerCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
export interface PolygonClickCallbackData {
|
||||
mapId: string;
|
||||
polygonId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface CircleClickCallbackData {
|
||||
mapId: string;
|
||||
circleId: string;
|
||||
tag?: string;
|
||||
}
|
||||
export interface MyLocationButtonClickCallbackData {
|
||||
mapId: string;
|
||||
}
|
||||
211
node_modules/@capacitor/google-maps/dist/typings/ts_old/implementation.d.ts
generated
vendored
Normal file
211
node_modules/@capacitor/google-maps/dist/typings/ts_old/implementation.d.ts
generated
vendored
Normal file
@@ -0,0 +1,211 @@
|
||||
import { Plugin } from '@capacitor/core';
|
||||
import { CameraConfig, Circle, GoogleMapConfig, LatLng, LatLngBounds, MapPadding, MapType, Marker, Polygon, Polyline, TileOverlay } from './definitions';
|
||||
/**
|
||||
* An interface containing the options used when creating a map.
|
||||
*/
|
||||
export interface CreateMapArgs {
|
||||
/**
|
||||
* A unique identifier for the map instance.
|
||||
*/
|
||||
id: string;
|
||||
/**
|
||||
* The Google Maps SDK API Key.
|
||||
*/
|
||||
apiKey: string;
|
||||
/**
|
||||
* The initial configuration settings for the map.
|
||||
*/
|
||||
config: GoogleMapConfig;
|
||||
/**
|
||||
* The DOM element that the Google Map View will be mounted on which determines size and positioning.
|
||||
*/
|
||||
element: HTMLElement;
|
||||
/**
|
||||
* Destroy and re-create the map instance if a map with the supplied id already exists
|
||||
* @default false
|
||||
*/
|
||||
forceCreate?: boolean;
|
||||
/**
|
||||
* The region parameter alters your application to serve different map tiles or bias the application (such as biasing geocoding results towards the region).
|
||||
*
|
||||
* Only available for web.
|
||||
*/
|
||||
region?: string;
|
||||
/**
|
||||
* The language parameter affects the names of controls, copyright notices, driving directions, and control labels, as well as the responses to service requests.
|
||||
*
|
||||
* Only available for web.
|
||||
*/
|
||||
language?: string;
|
||||
}
|
||||
export interface DestroyMapArgs {
|
||||
id: string;
|
||||
}
|
||||
export interface RemoveMarkerArgs {
|
||||
id: string;
|
||||
markerId: string;
|
||||
}
|
||||
export interface RemoveMarkersArgs {
|
||||
id: string;
|
||||
markerIds: string[];
|
||||
}
|
||||
export interface AddMarkerArgs {
|
||||
id: string;
|
||||
marker: Marker;
|
||||
}
|
||||
export interface AddPolygonsArgs {
|
||||
id: string;
|
||||
polygons: Polygon[];
|
||||
}
|
||||
export interface RemovePolygonsArgs {
|
||||
id: string;
|
||||
polygonIds: string[];
|
||||
}
|
||||
export interface AddCirclesArgs {
|
||||
id: string;
|
||||
circles: Circle[];
|
||||
}
|
||||
export interface RemoveCirclesArgs {
|
||||
id: string;
|
||||
circleIds: string[];
|
||||
}
|
||||
export interface AddPolylinesArgs {
|
||||
id: string;
|
||||
polylines: Polyline[];
|
||||
}
|
||||
export interface RemovePolylinesArgs {
|
||||
id: string;
|
||||
polylineIds: string[];
|
||||
}
|
||||
export interface CameraArgs {
|
||||
id: string;
|
||||
config: CameraConfig;
|
||||
}
|
||||
export interface MapTypeArgs {
|
||||
id: string;
|
||||
mapType: MapType;
|
||||
}
|
||||
export interface IndoorMapArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface RemoveTileOverlayArgs {
|
||||
id: string;
|
||||
tileOverlayId: string;
|
||||
}
|
||||
export interface AddTileOverlayArgs {
|
||||
id: string;
|
||||
tileOverlay: TileOverlay;
|
||||
}
|
||||
export interface TrafficLayerArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface AccElementsArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface PaddingArgs {
|
||||
id: string;
|
||||
padding: MapPadding;
|
||||
}
|
||||
export interface CurrentLocArgs {
|
||||
id: string;
|
||||
enabled: boolean;
|
||||
}
|
||||
export interface AddMarkersArgs {
|
||||
id: string;
|
||||
markers: Marker[];
|
||||
}
|
||||
export interface MapBoundsArgs {
|
||||
id: string;
|
||||
mapBounds: {
|
||||
x: number;
|
||||
y: number;
|
||||
width: number;
|
||||
height: number;
|
||||
};
|
||||
}
|
||||
export interface MapBoundsContainsArgs {
|
||||
bounds: LatLngBounds;
|
||||
point: LatLng;
|
||||
}
|
||||
export type MapBoundsExtendArgs = MapBoundsContainsArgs;
|
||||
export interface EnableClusteringArgs {
|
||||
id: string;
|
||||
minClusterSize?: number;
|
||||
}
|
||||
export interface FitBoundsArgs {
|
||||
id: string;
|
||||
bounds: LatLngBounds;
|
||||
padding?: number;
|
||||
}
|
||||
export interface CapacitorGoogleMapsPlugin extends Plugin {
|
||||
create(options: CreateMapArgs): Promise<void>;
|
||||
enableTouch(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
disableTouch(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
addTileOverlay(args: AddTileOverlayArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(args: RemoveTileOverlayArgs): Promise<void>;
|
||||
addMarker(args: AddMarkerArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
addMarkers(args: AddMarkersArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeMarker(args: RemoveMarkerArgs): Promise<void>;
|
||||
removeMarkers(args: RemoveMarkersArgs): Promise<void>;
|
||||
addPolygons(args: AddPolygonsArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolygons(args: RemovePolygonsArgs): Promise<void>;
|
||||
addCircles(args: AddCirclesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeCircles(args: RemoveCirclesArgs): Promise<void>;
|
||||
addPolylines(args: AddPolylinesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolylines(args: RemovePolylinesArgs): Promise<void>;
|
||||
enableClustering(args: EnableClusteringArgs): Promise<void>;
|
||||
disableClustering(args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
destroy(args: DestroyMapArgs): Promise<void>;
|
||||
setCamera(args: CameraArgs): Promise<void>;
|
||||
getMapType(args: {
|
||||
id: string;
|
||||
}): Promise<{
|
||||
type: string;
|
||||
}>;
|
||||
setMapType(args: MapTypeArgs): Promise<void>;
|
||||
enableIndoorMaps(args: IndoorMapArgs): Promise<void>;
|
||||
enableTrafficLayer(args: TrafficLayerArgs): Promise<void>;
|
||||
enableAccessibilityElements(args: AccElementsArgs): Promise<void>;
|
||||
enableCurrentLocation(args: CurrentLocArgs): Promise<void>;
|
||||
setPadding(args: PaddingArgs): Promise<void>;
|
||||
onScroll(args: MapBoundsArgs): Promise<void>;
|
||||
onResize(args: MapBoundsArgs): Promise<void>;
|
||||
onDisplay(args: MapBoundsArgs): Promise<void>;
|
||||
dispatchMapEvent(args: {
|
||||
id: string;
|
||||
focus: boolean;
|
||||
}): Promise<void>;
|
||||
getMapBounds(args: {
|
||||
id: string;
|
||||
}): Promise<LatLngBounds>;
|
||||
fitBounds(args: FitBoundsArgs): Promise<void>;
|
||||
mapBoundsContains(args: MapBoundsContainsArgs): Promise<{
|
||||
contains: boolean;
|
||||
}>;
|
||||
mapBoundsExtend(args: MapBoundsExtendArgs): Promise<{
|
||||
bounds: LatLngBounds;
|
||||
}>;
|
||||
}
|
||||
declare const CapacitorGoogleMaps: CapacitorGoogleMapsPlugin;
|
||||
export { CapacitorGoogleMaps };
|
||||
10
node_modules/@capacitor/google-maps/dist/typings/ts_old/index.d.ts
generated
vendored
Normal file
10
node_modules/@capacitor/google-maps/dist/typings/ts_old/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
import { LatLngBounds, MapType, Marker, Polygon, Circle, Polyline, StyleSpan } from './definitions';
|
||||
import { GoogleMap } from './map';
|
||||
export { GoogleMap, LatLngBounds, MapType, Marker, Polygon, Circle, Polyline, StyleSpan };
|
||||
declare global {
|
||||
export namespace JSX {
|
||||
interface IntrinsicElements {
|
||||
'capacitor-google-map': any;
|
||||
}
|
||||
}
|
||||
}
|
||||
360
node_modules/@capacitor/google-maps/dist/typings/ts_old/map.d.ts
generated
vendored
Normal file
360
node_modules/@capacitor/google-maps/dist/typings/ts_old/map.d.ts
generated
vendored
Normal file
@@ -0,0 +1,360 @@
|
||||
import { CameraConfig, Marker, MapPadding, MapListenerCallback, MapReadyCallbackData, CameraIdleCallbackData, CameraMoveStartedCallbackData, ClusterClickCallbackData, MapClickCallbackData, MarkerClickCallbackData, MyLocationButtonClickCallbackData, Polygon, PolygonClickCallbackData, Circle, CircleClickCallbackData, Polyline, PolylineCallbackData, TileOverlay } from './definitions';
|
||||
import { LatLngBounds, MapType } from './definitions';
|
||||
import { CreateMapArgs } from './implementation';
|
||||
export interface GoogleMapInterface {
|
||||
create(options: CreateMapArgs, callback?: MapListenerCallback<MapReadyCallbackData>): Promise<GoogleMap>;
|
||||
enableTouch(): Promise<void>;
|
||||
disableTouch(): Promise<void>;
|
||||
enableClustering(
|
||||
/**
|
||||
* The minimum number of markers that can be clustered together. The default is 4 markers.
|
||||
*/
|
||||
minClusterSize?: number): Promise<void>;
|
||||
disableClustering(): Promise<void>;
|
||||
addTileOverlay(tileOverlay: TileOverlay): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(id: string): Promise<void>;
|
||||
addMarker(marker: Marker): Promise<string>;
|
||||
addMarkers(markers: Marker[]): Promise<string[]>;
|
||||
removeMarker(id: string): Promise<void>;
|
||||
removeMarkers(ids: string[]): Promise<void>;
|
||||
addPolygons(polygons: Polygon[]): Promise<string[]>;
|
||||
removePolygons(ids: string[]): Promise<void>;
|
||||
addCircles(circles: Circle[]): Promise<string[]>;
|
||||
removeCircles(ids: string[]): Promise<void>;
|
||||
addPolylines(polylines: Polyline[]): Promise<string[]>;
|
||||
removePolylines(ids: string[]): Promise<void>;
|
||||
destroy(): Promise<void>;
|
||||
setCamera(config: CameraConfig): Promise<void>;
|
||||
/**
|
||||
* Get current map type
|
||||
*/
|
||||
getMapType(): Promise<MapType>;
|
||||
setMapType(mapType: MapType): Promise<void>;
|
||||
enableIndoorMaps(enabled: boolean): Promise<void>;
|
||||
enableTrafficLayer(enabled: boolean): Promise<void>;
|
||||
enableAccessibilityElements(enabled: boolean): Promise<void>;
|
||||
enableCurrentLocation(enabled: boolean): Promise<void>;
|
||||
setPadding(padding: MapPadding): Promise<void>;
|
||||
/**
|
||||
* Get the map's current viewport latitude and longitude bounds.
|
||||
*
|
||||
* @returns {LatLngBounds}
|
||||
*/
|
||||
getMapBounds(): Promise<LatLngBounds>;
|
||||
/**
|
||||
* Sets the map viewport to contain the given bounds.
|
||||
* @param bounds The bounds to fit in the viewport.
|
||||
* @param padding Optional padding to apply in pixels. The bounds will be fit in the part of the map that remains after padding is removed.
|
||||
*/
|
||||
fitBounds(bounds: LatLngBounds, padding?: number): Promise<void>;
|
||||
setOnBoundsChangedListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
setOnCameraIdleListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
setOnCameraMoveStartedListener(callback?: MapListenerCallback<CameraMoveStartedCallbackData>): Promise<void>;
|
||||
setOnClusterClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
setOnClusterInfoWindowClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
setOnInfoWindowClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMapClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
setOnMarkerClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnPolygonClickListener(callback?: MapListenerCallback<PolygonClickCallbackData>): Promise<void>;
|
||||
setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData>): Promise<void>;
|
||||
setOnPolylineClickListener(callback?: MapListenerCallback<PolylineCallbackData>): Promise<void>;
|
||||
setOnMarkerDragStartListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMarkerDragListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMarkerDragEndListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
setOnMyLocationButtonClickListener(callback?: MapListenerCallback<MyLocationButtonClickCallbackData>): Promise<void>;
|
||||
setOnMyLocationClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
}
|
||||
export declare class GoogleMap {
|
||||
private id;
|
||||
private element;
|
||||
private resizeObserver;
|
||||
private onBoundsChangedListener?;
|
||||
private onCameraIdleListener?;
|
||||
private onCameraMoveStartedListener?;
|
||||
private onClusterClickListener?;
|
||||
private onClusterInfoWindowClickListener?;
|
||||
private onInfoWindowClickListener?;
|
||||
private onMapClickListener?;
|
||||
private onPolylineClickListener?;
|
||||
private onMarkerClickListener?;
|
||||
private onPolygonClickListener?;
|
||||
private onCircleClickListener?;
|
||||
private onMarkerDragStartListener?;
|
||||
private onMarkerDragListener?;
|
||||
private onMarkerDragEndListener?;
|
||||
private onMyLocationButtonClickListener?;
|
||||
private onMyLocationClickListener?;
|
||||
private constructor();
|
||||
/**
|
||||
* Creates a new instance of a Google Map
|
||||
* @param options
|
||||
* @param callback
|
||||
* @returns GoogleMap
|
||||
*/
|
||||
static create(options: CreateMapArgs, callback?: MapListenerCallback<MapReadyCallbackData>): Promise<GoogleMap>;
|
||||
private static getElementBounds;
|
||||
/**
|
||||
* Enable touch events on native map
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
enableTouch(): Promise<void>;
|
||||
/**
|
||||
* Disable touch events on native map
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
disableTouch(): Promise<void>;
|
||||
/**
|
||||
* Enable marker clustering
|
||||
*
|
||||
* @param minClusterSize - The minimum number of markers that can be clustered together.
|
||||
* @defaultValue 4
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
enableClustering(minClusterSize?: number): Promise<void>;
|
||||
/**
|
||||
* Disable marker clustering
|
||||
*
|
||||
* @returns void
|
||||
*/
|
||||
disableClustering(): Promise<void>;
|
||||
/**
|
||||
* Adds a tile overlay to the map
|
||||
*
|
||||
* @param tileOverlay
|
||||
* @returns created tile overlay id
|
||||
*/
|
||||
addTileOverlay(tileOverlay: TileOverlay): Promise<string>;
|
||||
/**
|
||||
* Removes a tile overlay from the map
|
||||
*
|
||||
* @param id of the tile overlay to remove from the map
|
||||
* @returns void
|
||||
*/
|
||||
removeTileOverlay(id: string): Promise<void>;
|
||||
/**
|
||||
* Adds a marker to the map
|
||||
*
|
||||
* @param marker
|
||||
* @returns created marker id
|
||||
*/
|
||||
addMarker(marker: Marker): Promise<string>;
|
||||
/**
|
||||
* Adds multiple markers to the map
|
||||
*
|
||||
* @param markers
|
||||
* @returns array of created marker IDs
|
||||
*/
|
||||
addMarkers(markers: Marker[]): Promise<string[]>;
|
||||
/**
|
||||
* Remove marker from the map
|
||||
*
|
||||
* @param id id of the marker to remove from the map
|
||||
* @returns
|
||||
*/
|
||||
removeMarker(id: string): Promise<void>;
|
||||
/**
|
||||
* Remove markers from the map
|
||||
*
|
||||
* @param ids array of ids to remove from the map
|
||||
* @returns
|
||||
*/
|
||||
removeMarkers(ids: string[]): Promise<void>;
|
||||
addPolygons(polygons: Polygon[]): Promise<string[]>;
|
||||
addPolylines(polylines: Polyline[]): Promise<string[]>;
|
||||
removePolygons(ids: string[]): Promise<void>;
|
||||
addCircles(circles: Circle[]): Promise<string[]>;
|
||||
removeCircles(ids: string[]): Promise<void>;
|
||||
removePolylines(ids: string[]): Promise<void>;
|
||||
/**
|
||||
* Destroy the current instance of the map
|
||||
*/
|
||||
destroy(): Promise<void>;
|
||||
/**
|
||||
* Update the map camera configuration
|
||||
*
|
||||
* @param config
|
||||
* @returns
|
||||
*/
|
||||
setCamera(config: CameraConfig): Promise<void>;
|
||||
getMapType(): Promise<MapType>;
|
||||
/**
|
||||
* Sets the type of map tiles that should be displayed.
|
||||
*
|
||||
* @param mapType
|
||||
* @returns
|
||||
*/
|
||||
setMapType(mapType: MapType): Promise<void>;
|
||||
/**
|
||||
* Sets whether indoor maps are shown, where available.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableIndoorMaps(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Controls whether the map is drawing traffic data, if available.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableTrafficLayer(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Show accessibility elements for overlay objects, such as Marker and Polyline.
|
||||
*
|
||||
* Only available on iOS.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableAccessibilityElements(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Set whether the My Location dot and accuracy circle is enabled.
|
||||
*
|
||||
* @param enabled
|
||||
* @returns
|
||||
*/
|
||||
enableCurrentLocation(enabled: boolean): Promise<void>;
|
||||
/**
|
||||
* Set padding on the 'visible' region of the view.
|
||||
*
|
||||
* @param padding
|
||||
* @returns
|
||||
*/
|
||||
setPadding(padding: MapPadding): Promise<void>;
|
||||
/**
|
||||
* Get the map's current viewport latitude and longitude bounds.
|
||||
*
|
||||
* @returns {LatLngBounds}
|
||||
*/
|
||||
getMapBounds(): Promise<LatLngBounds>;
|
||||
fitBounds(bounds: LatLngBounds, padding?: number): Promise<void>;
|
||||
initScrolling(): void;
|
||||
disableScrolling(): void;
|
||||
handleScrollEvent: () => void;
|
||||
private updateMapBounds;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCameraIdle' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCameraIdleListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onBoundsChanged' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnBoundsChangedListener(callback?: MapListenerCallback<CameraIdleCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCameraMoveStarted' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCameraMoveStartedListener(callback?: MapListenerCallback<CameraMoveStartedCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onClusterClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnClusterClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onClusterInfoWindowClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnClusterInfoWindowClickListener(callback?: MapListenerCallback<ClusterClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onInfoWindowClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnInfoWindowClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMapClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMapClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onPolygonClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnPolygonClickListener(callback?: MapListenerCallback<PolygonClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onCircleClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnCircleClickListener(callback?: MapListenerCallback<CircleClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerClickListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onPolylineClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnPolylineClickListener(callback?: MapListenerCallback<PolylineCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDragStart' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragStartListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDrag' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMarkerDragEnd' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMarkerDragEndListener(callback?: MapListenerCallback<MarkerClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMyLocationButtonClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMyLocationButtonClickListener(callback?: MapListenerCallback<MyLocationButtonClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Set the event listener on the map for 'onMyLocationClick' events.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
setOnMyLocationClickListener(callback?: MapListenerCallback<MapClickCallbackData>): Promise<void>;
|
||||
/**
|
||||
* Remove all event listeners on the map.
|
||||
*
|
||||
* @param callback
|
||||
* @returns
|
||||
*/
|
||||
removeAllMapListeners(): Promise<void>;
|
||||
private generateCallback;
|
||||
}
|
||||
88
node_modules/@capacitor/google-maps/dist/typings/ts_old/web.d.ts
generated
vendored
Normal file
88
node_modules/@capacitor/google-maps/dist/typings/ts_old/web.d.ts
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
import { WebPlugin } from '@capacitor/core';
|
||||
import { LatLngBounds } from './definitions';
|
||||
import { AddTileOverlayArgs, AddMarkerArgs, CameraArgs, AddMarkersArgs, CapacitorGoogleMapsPlugin, CreateMapArgs, CurrentLocArgs, DestroyMapArgs, MapTypeArgs, PaddingArgs, RemoveMarkerArgs, TrafficLayerArgs, RemoveMarkersArgs, MapBoundsContainsArgs, EnableClusteringArgs, FitBoundsArgs, MapBoundsExtendArgs, AddPolygonsArgs, RemovePolygonsArgs, AddCirclesArgs, RemoveCirclesArgs, AddPolylinesArgs, RemovePolylinesArgs, RemoveTileOverlayArgs } from './implementation';
|
||||
export declare class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogleMapsPlugin {
|
||||
private gMapsRef;
|
||||
private AdvancedMarkerElement;
|
||||
private PinElement;
|
||||
private maps;
|
||||
private currMarkerId;
|
||||
private currTileOverlayId;
|
||||
private currPolygonId;
|
||||
private currCircleId;
|
||||
private currPolylineId;
|
||||
private currMapId;
|
||||
private onClusterClickHandler;
|
||||
private getIdFromMap;
|
||||
private getIdFromMarker;
|
||||
private importGoogleLib;
|
||||
enableTouch(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
disableTouch(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
setCamera(_args: CameraArgs): Promise<void>;
|
||||
getMapType(_args: {
|
||||
id: string;
|
||||
}): Promise<{
|
||||
type: string;
|
||||
}>;
|
||||
setMapType(_args: MapTypeArgs): Promise<void>;
|
||||
enableIndoorMaps(): Promise<void>;
|
||||
enableTrafficLayer(_args: TrafficLayerArgs): Promise<void>;
|
||||
enableAccessibilityElements(): Promise<void>;
|
||||
dispatchMapEvent(): Promise<void>;
|
||||
enableCurrentLocation(_args: CurrentLocArgs): Promise<void>;
|
||||
setPadding(_args: PaddingArgs): Promise<void>;
|
||||
getMapBounds(_args: {
|
||||
id: string;
|
||||
}): Promise<LatLngBounds>;
|
||||
fitBounds(_args: FitBoundsArgs): Promise<void>;
|
||||
addTileOverlay(_args: AddTileOverlayArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(_args: RemoveTileOverlayArgs): Promise<void>;
|
||||
addMarkers(_args: AddMarkersArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
addMarker(_args: AddMarkerArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeMarkers(_args: RemoveMarkersArgs): Promise<void>;
|
||||
removeMarker(_args: RemoveMarkerArgs): Promise<void>;
|
||||
addPolygons(args: AddPolygonsArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolygons(args: RemovePolygonsArgs): Promise<void>;
|
||||
addCircles(args: AddCirclesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeCircles(args: RemoveCirclesArgs): Promise<void>;
|
||||
addPolylines(args: AddPolylinesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolylines(args: RemovePolylinesArgs): Promise<void>;
|
||||
enableClustering(_args: EnableClusteringArgs): Promise<void>;
|
||||
disableClustering(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
onScroll(): Promise<void>;
|
||||
onResize(): Promise<void>;
|
||||
onDisplay(): Promise<void>;
|
||||
create(_args: CreateMapArgs): Promise<void>;
|
||||
destroy(_args: DestroyMapArgs): Promise<void>;
|
||||
mapBoundsContains(_args: MapBoundsContainsArgs): Promise<{
|
||||
contains: boolean;
|
||||
}>;
|
||||
mapBoundsExtend(_args: MapBoundsExtendArgs): Promise<{
|
||||
bounds: LatLngBounds;
|
||||
}>;
|
||||
private getLatLngBounds;
|
||||
setCircleListeners(mapId: string, circleId: string, circle: google.maps.Circle): Promise<void>;
|
||||
setPolygonListeners(mapId: string, polygonId: string, polygon: google.maps.Polygon): Promise<void>;
|
||||
setPolylineListeners(mapId: string, polylineId: string, polyline: google.maps.Polyline): Promise<void>;
|
||||
setMarkerListeners(mapId: string, markerId: string, marker: google.maps.marker.AdvancedMarkerElement): Promise<void>;
|
||||
setMapListeners(mapId: string): Promise<void>;
|
||||
private buildMarkerOpts;
|
||||
}
|
||||
88
node_modules/@capacitor/google-maps/dist/typings/web.d.ts
generated
vendored
Normal file
88
node_modules/@capacitor/google-maps/dist/typings/web.d.ts
generated
vendored
Normal file
@@ -0,0 +1,88 @@
|
||||
import { WebPlugin } from '@capacitor/core';
|
||||
import { LatLngBounds } from './definitions';
|
||||
import type { AddTileOverlayArgs, AddMarkerArgs, CameraArgs, AddMarkersArgs, CapacitorGoogleMapsPlugin, CreateMapArgs, CurrentLocArgs, DestroyMapArgs, MapTypeArgs, PaddingArgs, RemoveMarkerArgs, TrafficLayerArgs, RemoveMarkersArgs, MapBoundsContainsArgs, EnableClusteringArgs, FitBoundsArgs, MapBoundsExtendArgs, AddPolygonsArgs, RemovePolygonsArgs, AddCirclesArgs, RemoveCirclesArgs, AddPolylinesArgs, RemovePolylinesArgs, RemoveTileOverlayArgs } from './implementation';
|
||||
export declare class CapacitorGoogleMapsWeb extends WebPlugin implements CapacitorGoogleMapsPlugin {
|
||||
private gMapsRef;
|
||||
private AdvancedMarkerElement;
|
||||
private PinElement;
|
||||
private maps;
|
||||
private currMarkerId;
|
||||
private currTileOverlayId;
|
||||
private currPolygonId;
|
||||
private currCircleId;
|
||||
private currPolylineId;
|
||||
private currMapId;
|
||||
private onClusterClickHandler;
|
||||
private getIdFromMap;
|
||||
private getIdFromMarker;
|
||||
private importGoogleLib;
|
||||
enableTouch(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
disableTouch(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
setCamera(_args: CameraArgs): Promise<void>;
|
||||
getMapType(_args: {
|
||||
id: string;
|
||||
}): Promise<{
|
||||
type: string;
|
||||
}>;
|
||||
setMapType(_args: MapTypeArgs): Promise<void>;
|
||||
enableIndoorMaps(): Promise<void>;
|
||||
enableTrafficLayer(_args: TrafficLayerArgs): Promise<void>;
|
||||
enableAccessibilityElements(): Promise<void>;
|
||||
dispatchMapEvent(): Promise<void>;
|
||||
enableCurrentLocation(_args: CurrentLocArgs): Promise<void>;
|
||||
setPadding(_args: PaddingArgs): Promise<void>;
|
||||
getMapBounds(_args: {
|
||||
id: string;
|
||||
}): Promise<LatLngBounds>;
|
||||
fitBounds(_args: FitBoundsArgs): Promise<void>;
|
||||
addTileOverlay(_args: AddTileOverlayArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeTileOverlay(_args: RemoveTileOverlayArgs): Promise<void>;
|
||||
addMarkers(_args: AddMarkersArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
addMarker(_args: AddMarkerArgs): Promise<{
|
||||
id: string;
|
||||
}>;
|
||||
removeMarkers(_args: RemoveMarkersArgs): Promise<void>;
|
||||
removeMarker(_args: RemoveMarkerArgs): Promise<void>;
|
||||
addPolygons(args: AddPolygonsArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolygons(args: RemovePolygonsArgs): Promise<void>;
|
||||
addCircles(args: AddCirclesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removeCircles(args: RemoveCirclesArgs): Promise<void>;
|
||||
addPolylines(args: AddPolylinesArgs): Promise<{
|
||||
ids: string[];
|
||||
}>;
|
||||
removePolylines(args: RemovePolylinesArgs): Promise<void>;
|
||||
enableClustering(_args: EnableClusteringArgs): Promise<void>;
|
||||
disableClustering(_args: {
|
||||
id: string;
|
||||
}): Promise<void>;
|
||||
onScroll(): Promise<void>;
|
||||
onResize(): Promise<void>;
|
||||
onDisplay(): Promise<void>;
|
||||
create(_args: CreateMapArgs): Promise<void>;
|
||||
destroy(_args: DestroyMapArgs): Promise<void>;
|
||||
mapBoundsContains(_args: MapBoundsContainsArgs): Promise<{
|
||||
contains: boolean;
|
||||
}>;
|
||||
mapBoundsExtend(_args: MapBoundsExtendArgs): Promise<{
|
||||
bounds: LatLngBounds;
|
||||
}>;
|
||||
private getLatLngBounds;
|
||||
setCircleListeners(mapId: string, circleId: string, circle: google.maps.Circle): Promise<void>;
|
||||
setPolygonListeners(mapId: string, polygonId: string, polygon: google.maps.Polygon): Promise<void>;
|
||||
setPolylineListeners(mapId: string, polylineId: string, polyline: google.maps.Polyline): Promise<void>;
|
||||
setMarkerListeners(mapId: string, markerId: string, marker: google.maps.marker.AdvancedMarkerElement): Promise<void>;
|
||||
setMapListeners(mapId: string): Promise<void>;
|
||||
private buildMarkerOpts;
|
||||
}
|
||||
Reference in New Issue
Block a user