awesome-cordova-plugins/src/plugins/googlemaps.ts

832 lines
20 KiB
TypeScript
Raw Normal View History

import {Cordova, Plugin} from './plugin';
2016-05-21 04:59:18 +08:00
import {Observable} from 'rxjs/Rx';
import {CordovaInstance} from './plugin';
/**
* Created by Ibrahim on 3/29/2016.
*/
declare var plugin: any;
2016-06-01 18:20:25 +08:00
/**
* You can listen to these events where appropriate
*/
export const GoogleMapsEvent = {
MAP_READY: plugin.google.maps.event.MAP_READY,
MAP_CLICK: plugin.google.maps.event.MAP_CLICK,
MAP_LONG_CLICK: plugin.google.maps.event.MAP_LONG_CLICK,
MY_LOCATION_BUTTON_CLICK: plugin.google.maps.event.MY_LOCATION_BUTTON_CLICK,
CAMERA_CHANGE: plugin.google.maps.event.CAMERA_CHANGE,
CAMERA_IDLE: plugin.google.maps.event.CAMERA_IDLE,
MAP_LOADED: plugin.google.maps.event.MAP_LOADED,
MAP_WILL_MOVE: plugin.google.maps.event.MAP_WILL_MOVE,
MAP_CLOSE: plugin.google.maps.event.MAP_CLOSE,
MARKER_CLICK: plugin.google.maps.event.MARKER_CLICK,
INFO_CLICK: plugin.google.maps.event.INFO_CLICK,
MARKER_DRAG: plugin.google.maps.event.MARKER_DRAG,
MARKER_DRAG_START: plugin.google.maps.event.MARKER_DRAG_START,
2016-06-01 18:41:59 +08:00
MARKER_DRAG_END: plugin.google.maps.event.MARKER_DRAG_END,
OVERLAY_CLICK: plugin.google.maps.event.OVERLAY_CLICK
2016-06-01 18:20:25 +08:00
};
/**
* @name Google Maps
2016-05-25 12:53:35 +08:00
* @description This plugin uses the native Google Maps SDK
* @usage
* ```
2016-06-01 18:20:25 +08:00
* import {GoogleMaps, GoogleMapsEvent} from 'ionic-native';
2016-05-25 12:53:35 +08:00
*
* ...
*
* // somewhere in your component
* let map = new GoogleMaps('elementID');
*
2016-06-01 18:20:25 +08:00
* map.on(GoogleMapsEvent.MAP_READY).subscribe(() => console.log("Map is ready!"));
2016-05-25 12:53:35 +08:00
* ```
*/
@Plugin({
2016-05-25 15:12:11 +08:00
pluginRef: 'plugin.google.maps.Map',
2016-04-30 10:47:45 +08:00
plugin: 'cordova-plugin-googlemaps',
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps'
})
2016-05-26 05:40:00 +08:00
export class GoogleMap {
2016-06-01 18:05:15 +08:00
_objectInstance: any;
2016-05-25 15:12:11 +08:00
/**
* Checks if a map object has been created.
2016-05-26 05:40:00 +08:00
* @return {Promise<GoogleMap>} returns a promise that resolves with the Map object (if it exists).
2016-05-25 15:12:11 +08:00
*/
@Cordova()
2016-05-26 05:40:00 +08:00
static isAvailable (): Promise<GoogleMap> {return; }
2016-05-25 15:12:11 +08:00
constructor (elementId: string) {
2016-04-30 10:47:01 +08:00
this._objectInstance = plugin.google.maps.Map.getMap(document.getElementById(elementId));
}
2016-06-01 18:05:15 +08:00
on(event: any): Observable<any>{
return new Observable(
(observer) => {
this._objectInstance.on(event, observer.next);
return () => this._objectInstance.off(event);
}
);
}
2016-05-25 15:12:11 +08:00
2016-06-01 18:05:15 +08:00
one(event: any): Promise<any>{
return new Promise<any>(
resolve => this._objectInstance.one(event, resolve)
);
}
2016-05-25 15:12:11 +08:00
@CordovaInstance({
sync: true
})
setDebuggable (isDebuggable: boolean): void {}
2016-05-25 15:12:11 +08:00
@CordovaInstance({
sync: true
})
setClickable (isClickable: boolean): void {}
2016-05-25 15:12:11 +08:00
/**
2016-05-25 15:12:58 +08:00
* Get the position of the camera
2016-05-25 15:12:11 +08:00
*/
@CordovaInstance()
getCameraPosition (): Promise<CameraPosition> {return; }
/**
2016-05-25 15:12:58 +08:00
* Get the location of the user
2016-05-25 15:12:11 +08:00
*/
@CordovaInstance()
getMyLocation (): Promise<MyLocation> {return; }
/**
2016-05-25 15:12:58 +08:00
* Get the visible region
2016-05-25 15:12:11 +08:00
*/
@CordovaInstance()
getVisibleRegion (): Promise<VisibleRegion> {return; }
2016-05-25 15:31:27 +08:00
@CordovaInstance({
sync: true
})
showDialog (): void { }
@CordovaInstance({
sync: true
})
closeDialog (): void { }
@CordovaInstance()
getLicenseInfo (): Promise<string> {return ;}
@CordovaInstance({
sync: true
})
setCenter (latLng: GoogleMapsLatLng): void { }
@CordovaInstance({
sync: true
})
2016-05-25 15:33:27 +08:00
setZoom (zoomLevel: number): void { }
2016-05-25 15:31:27 +08:00
@CordovaInstance({
sync: true
})
setMapTypeId (typeId: string): void { }
@CordovaInstance({
sync: true
})
setTilt (tiltLevel: number): void { }
@CordovaInstance({
sync: true
})
animateCamera (cameraPosition: CameraPosition): void { }
@CordovaInstance({
sync: true
})
moveCamera (cameraPosition: CameraPosition): void { }
@CordovaInstance({
sync: true
})
setMyLocationEnabled (enabled: boolean): void { }
@CordovaInstance({
sync: true
})
setIndoorEnabled (enabled: boolean): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setTrafficEnabled (enabled: boolean): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setCompassEnabled (enabled: boolean): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setAllGesturesEnabled (enabled: boolean): void { }
2016-06-01 18:05:15 +08:00
addMarker (options: GoogleMapsMarkerOptions): Promise<GoogleMapsMarker> {
return new Promise<GoogleMapsMarker>(
(resolve, reject) => {
this._objectInstance.addMarker(options, (marker: any) => {
if(marker) resolve(new GoogleMapsMarker(marker));
else reject();
});
}
);
2016-05-26 04:48:03 +08:00
}
2016-05-25 15:31:27 +08:00
2016-06-01 18:20:25 +08:00
addCircle (options: GoogleMapsCircleOptions): Promise<GoogleMapsCircle> {
return new Promise<GoogleMapsCircle>(
(resolve, reject) => {
this._objectInstance.addCircle(options, (circle: any) => {
2016-06-01 18:41:59 +08:00
if(circle) resolve(new GoogleMapsCircle(circle));
2016-06-01 18:20:25 +08:00
else reject();
});
}
);
2016-05-26 05:07:53 +08:00
}
2016-05-25 15:31:27 +08:00
2016-06-01 18:41:59 +08:00
addPolygon (options: GoogleMapsPolygonOptions): Promise<GoogleMapsPolygon> {
return new Promise<GoogleMapsPolygon>(
(resolve, reject) => {
this._objectInstance.addPolygon(options, (polygon: any) => {
if(polygon) resolve(new GoogleMapsPolygon(polygon));
else reject();
});
}
);
}
2016-05-25 15:31:27 +08:00
2016-06-01 18:41:59 +08:00
addPolyline (options: GoogleMapsPolylineOptions): Promise<GoogleMapsPolyline> {
return new Promise<GoogleMapsPolyline>(
(resolve, reject) => {
this._objectInstance.addPolyline(options, (polyline: any) => {
if(polyline) resolve(new GoogleMapsPolyline(polyline));
else reject();
});
}
);
}
2016-05-25 15:31:27 +08:00
2016-06-01 18:41:59 +08:00
addTileOverlay (options: GoogleMapsTileOverlayOptions): Promise<GoogleMapsTileOverlay> {
return new Promise<GoogleMapsTileOverlay>(
(resolve, reject) => {
this._objectInstance.addTileOverlay(options, (tileOverlay: any) => {
2016-06-01 18:44:56 +08:00
if(tileOverlay) resolve(new GoogleMapsTileOverlay(tileOverlay));
2016-06-01 18:41:59 +08:00
else reject();
});
}
)
}
2016-05-25 15:31:27 +08:00
2016-06-01 18:41:59 +08:00
addGroundOverlay (options: GoogleMapsGroundOverlayOptions): Promise<GoogleMapsGroundOverlay> {
return new Promise<GoogleMapsGroundOverlay>(
(resolve, reject) => {
this._objectInstance.addTileOverlay(options, (groundOverlay: any) => {
2016-06-01 18:44:56 +08:00
if(groundOverlay) resolve(new GoogleMapsGroundOverlay(groundOverlay));
2016-06-01 18:41:59 +08:00
else reject();
});
}
)
}
addKmlOverlay (options: GoogleMapsKmlOverlayOptions): Promise<GoogleMapsKmlOverlay> {
return new Promise<GoogleMapsKmlOverlay>(
(resolve, reject) => {
this._objectInstance.addTileOverlay(options, (kmlOverlay: any) => {
2016-06-01 18:44:56 +08:00
if(kmlOverlay) resolve(new GoogleMapsKmlOverlay(kmlOverlay));
2016-06-01 18:41:59 +08:00
else reject();
});
}
)
}
2016-05-25 15:31:27 +08:00
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setDiv (domNode: HTMLElement): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setVisible (visible: boolean): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setOptions (options: any): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setBackgroundColor (backgroundColor: string): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
setPadding (top?: number, right?: number, bottom?: number, left?: number): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
clear (): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
refreshLayout (): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance()
2016-05-25 15:31:27 +08:00
fromLatLngToPoint (latLng: GoogleMapsLatLng, point: any): Promise<any> {return; }
2016-05-25 15:32:05 +08:00
@CordovaInstance()
2016-05-25 15:31:27 +08:00
fromPointToLatLng (point: any, latLng: GoogleMapsLatLng): Promise<GoogleMapsLatLng> {return; }
2016-05-25 15:32:05 +08:00
@CordovaInstance()
2016-05-25 15:31:27 +08:00
toDataURL (): Promise<any> {return; }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
remove (): void { }
2016-05-25 15:32:05 +08:00
@CordovaInstance({
sync: true
})
2016-05-25 15:31:27 +08:00
panBy (): void { }
2016-05-25 15:12:11 +08:00
}
export interface AnimateCameraOptions {
2016-06-01 18:05:15 +08:00
target?: string;
tilt?: number;
zoom?: number;
bearing?: number;
duration?: number;
2016-05-25 15:12:11 +08:00
}
export interface CameraPosition {
2016-06-01 18:05:15 +08:00
target?: {
lat?: string;
lng?: string;
2016-05-25 15:12:11 +08:00
};
2016-06-01 18:05:15 +08:00
zoom?: number;
tilt?: number;
bearing?: number;
2016-05-25 15:12:11 +08:00
}
export interface MyLocation {
2016-06-01 18:05:15 +08:00
latLng?: {
lat?: string;
lng?: string;
2016-05-25 15:12:11 +08:00
};
2016-06-01 18:05:15 +08:00
speed?: number;
time?: string;
bearing?: number;
2016-03-29 18:56:21 +08:00
}
2016-05-25 15:12:11 +08:00
export interface VisibleRegion {
2016-06-01 18:05:15 +08:00
northeast?: any;
southwest?: any;
2016-05-25 15:12:11 +08:00
}
2016-05-26 05:07:53 +08:00
export interface GoogleMapsMarkerOptions {
2016-06-01 18:05:15 +08:00
icon?: any;
title?: string;
snippet?: string;
position?: GoogleMapsLatLng;
infoWindowAnchor?: number[];
draggable?: boolean;
flat?: boolean;
rotation?: number;
visible?: boolean;
styles?: any;
animation?: string;
zIndex?: number;
2016-05-26 05:07:53 +08:00
}
2016-05-26 05:40:00 +08:00
export interface GoogleMapsMarkerIcon {
2016-06-01 18:05:15 +08:00
url?: string;
size?: {
width?: number;
height?: number;
2016-05-26 05:40:00 +08:00
}
}
2016-05-26 04:43:18 +08:00
export class GoogleMapsMarker {
2016-05-25 15:52:00 +08:00
2016-05-26 04:43:18 +08:00
constructor (private _objectInstance: any) { }
2016-06-01 18:20:25 +08:00
addEventListener(event: any): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next);
return () => this._objectInstance.removeEventListener(event, observer.next)
}
);
}
2016-05-26 04:43:18 +08:00
@CordovaInstance({
sync: true
})
isVisible (): boolean {return;}
@CordovaInstance()
setVisible (visible: boolean): void { }
@CordovaInstance({
sync: true
})
getHashCode (): string {return; }
@CordovaInstance({
sync: true
})
remove(): void { }
@CordovaInstance({
sync: true
})
setOpacity (alpha: number): void { }
@CordovaInstance({
sync: true
})
getOpacity(): number {return; }
@CordovaInstance({
sync: true
})
setZIndex(): void { }
@CordovaInstance({
sync: true
})
setIconAnchor(x: number, y: number): void { }
@CordovaInstance({
sync: true
})
setInfoWindowAnchor(x: number, y:number): void { }
@CordovaInstance({
sync: true
})
setDraggable(draggable: boolean): void { }
@CordovaInstance({
sync: true
})
isDraggable(): boolean {return; }
@CordovaInstance({
sync: true
})
setFlat(flat: boolean): void {return; }
@CordovaInstance({
sync: true
})
setIcon(icon: GoogleMapsMarkerIcon): void { }
@CordovaInstance({
sync: true
})
setTitle(title: string): void { }
@CordovaInstance({
sync: true
})
getTitle(): string {return; }
@CordovaInstance({
sync: true
})
setSnippet(snippet: string): void { }
@CordovaInstance({
sync: true
})
getSnippet(): string {return; }
@CordovaInstance({
sync: true
})
setRotation(rotation: number): void { }
@CordovaInstance({
sync: true
})
getRotation(): number {return; }
@CordovaInstance({
sync: true
})
showInfoWindow(): number {return; }
@CordovaInstance({
sync: true
})
hideInfoWindow(): number {return; }
@CordovaInstance({
sync: true
})
setPosition(latLng: GoogleMapsLatLng): void { }
@CordovaInstance()
getPosition(): Promise<GoogleMapsLatLng> {return; }
@CordovaInstance({
sync: true
})
2016-05-26 05:40:00 +08:00
getMap(): GoogleMap {return; }
2016-05-26 04:43:18 +08:00
@CordovaInstance({
sync: true
})
setAnimation(animation: string): void { }
2016-05-25 15:52:00 +08:00
}
2016-05-26 05:07:53 +08:00
export interface GoogleMapsCircleOptions {
2016-06-01 18:05:15 +08:00
center?: GoogleMapsLatLng;
radius?: number;
strokeColor?: string;
strokeWidth?: number;
fillColor?: string;
visible?: boolean;
zIndex?: number;
2016-05-26 05:07:53 +08:00
}
2016-05-26 04:59:32 +08:00
export class GoogleMapsCircle {
2016-06-01 18:20:25 +08:00
constructor(private _objectInstance: any) { }
addEventListener(event: any): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next);
return () => this._objectInstance.removeEventListener(event, observer.next)
}
);
}
2016-05-26 04:59:32 +08:00
@CordovaInstance({
sync: true
})
getCenter(): GoogleMapsLatLng {return; }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
getRadius(): number {return; }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
getStrokeColor(): string {return; }
@CordovaInstance({
sync: true
})
getVisible(): boolean {return; }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
getZIndex(): number {return; }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
remove(): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setCenter(latLng: GoogleMapsLatLng): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setFillColor(fillColor: string): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setStrokeColor(strokeColor: string): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setStrokeWidth(strokeWidth: number): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setVisible(visible: boolean): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setZIndex(zIndex: number): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
2016-05-26 04:59:32 +08:00
setRadius(radius: number): void { }
2016-05-26 05:40:00 +08:00
@CordovaInstance({
sync: true
})
getMap(): GoogleMap {return; }
}
export interface GoogleMapsPolylineOptions {
2016-06-01 18:05:15 +08:00
points?: Array<GoogleMapsLatLng>;
visible?: boolean;
googledesic?: boolean;
color?: string;
width?: number;
zIndex?: number;
2016-05-26 05:40:00 +08:00
}
export class GoogleMapsPolyline {
constructor (private _objectInstance: any) { }
2016-06-01 18:41:59 +08:00
addEventListener(event: any): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next);
return () => this._objectInstance.removeEventListener(event, observer.next)
}
);
}
2016-05-26 05:40:00 +08:00
@CordovaInstance({sync: true})
getPoints(): Array<GoogleMapsLatLng> {return; }
@CordovaInstance({sync: true})
getCOlor(): string {return; }
@CordovaInstance({sync: true})
getWidth(): number {return; }
@CordovaInstance({sync: true})
getGeodesic(): boolean {return; }
@CordovaInstance({sync: true})
getZIndex(): number {return; }
@CordovaInstance({sync: true})
remove(): void { }
@CordovaInstance({sync: true})
setPoints(points: Array<GoogleMapsLatLng>): void { }
@CordovaInstance({sync: true})
setColor(color: string): void { }
@CordovaInstance({sync: true})
setWidth(width: number): void { }
@CordovaInstance({sync: true})
setVisible(visible: boolean): void { }
2016-05-26 04:59:32 +08:00
2016-05-26 05:40:00 +08:00
@CordovaInstance({sync: true})
setZIndex(zIndex: number): void { }
@CordovaInstance({sync: true})
setGeoDesic(geoDesic: boolean): void { }
2016-05-26 04:59:32 +08:00
2016-05-26 05:40:00 +08:00
@CordovaInstance({sync: true})
getMap(): GoogleMap {return; }
2016-05-26 04:59:32 +08:00
}
2016-06-01 18:41:59 +08:00
export interface GoogleMapsPolygonOptions {
points?: Array<GoogleMapsLatLng>;
geodesic?: boolean;
strokeColor?: string;
strokeWidth?: number;
fillColor?: string;
visible?: boolean;
zIndex?: number;
addHole?: Array<GoogleMapsLatLng>
}
export class GoogleMapsPolygon {
constructor(private _objectInstance: any) { }
addEventListener(event: any): Observable<any> {
return new Observable(
(observer) => {
this._objectInstance.addEventListener(event, observer.next);
return () => this._objectInstance.removeEventListener(event, observer.next)
}
);
}
@CordovaInstance({sync: true})
getPoints(): Array<GoogleMapsLatLng> { return; }
@CordovaInstance({sync: true})
getStrokeColor(): string {return; }
@CordovaInstance({sync: true})
getFillColor(): string {return; }
@CordovaInstance({sync: true})
getStrokeWidth(): number {return; }
@CordovaInstance({sync: true})
getGeodesic(): boolean {return; }
@CordovaInstance({sync: true})
getVisible(): boolean {return; }
@CordovaInstance({sync: true})
getZIndex(): boolean {return; }
@CordovaInstance({sync: true})
remove(): void { }
@CordovaInstance({sync: true})
setPoints(points: Array<GoogleMapsLatLng>): void { }
@CordovaInstance({sync: true})
setStrokeColor(strokeColor: string): void { }
@CordovaInstance({sync: true})
setFillColor(fillColor: string): void { }
@CordovaInstance({sync: true})
setStrokeWidth(strokeWidth: number): void { }
@CordovaInstance({sync: true})
setVisible(visible: boolean): void { }
@CordovaInstance({sync: true})
setZIndex(zIndex: number): void { }
@CordovaInstance({sync: true})
setGeodesic(geodesic: boolean): void { }
}
export interface GoogleMapsTileOverlayOptions {
titleUrilFormat?: string;
visible?: boolean;
zIndex?: number;
tileSize?: number;
opacity?: number;
}
export class GoogleMapsTileOverlay {
constructor(private _objectInstance: any) { }
@CordovaInstance({sync: true})
getVisible(): boolean {return; }
@CordovaInstance({sync: true})
setVisible(visible: boolean): void { }
@CordovaInstance({sync: true})
getFadeIn(): boolean {return; }
@CordovaInstance({sync: true})
setFadeIn(fadeIn: boolean): void { }
@CordovaInstance({sync: true})
getZIndex(): number {return; }
@CordovaInstance({sync: true})
setZIndex(zIndex: number): void { }
@CordovaInstance({sync: true})
getOpacity(): number {return; }
@CordovaInstance({sync: true})
setOpacity(opacity: number): void { }
@CordovaInstance({sync: true})
clearTileCache(): void { }
@CordovaInstance({sync: true})
remove(): void { }
}
export interface GoogleMapsGroundOverlayOptions {
url?: string;
bounds?: Array<GoogleMapsLatLng>;
visible?: boolean;
opacity?: number;
bearing?: number;
zIndex?: number;
}
export class GoogleMapsGroundOverlay {
constructor(private _objectInstance: any) { }
@CordovaInstance({sync: true})
setBearing(bearing: number): void { }
@CordovaInstance({sync: true})
getBearing(): number {return; }
@CordovaInstance({sync: true})
setOpacity(opacity: number): void { }
@CordovaInstance({sync: true})
getOpacity(): number {return; }
@CordovaInstance({sync: true})
setVisible(visible: boolean): void { }
@CordovaInstance({sync: true})
getVisible(): boolean {return; }
@CordovaInstance({sync: true})
setImage(image: string): void { };
@CordovaInstance({sync: true})
remove(): void { }
}
export interface GoogleMapsKmlOverlayOptions {
url?: string;
preserveViewport?: boolean;
animation?: boolean;
}
export class GoogleMapsKmlOverlay {
constructor(private _objectInstance: any) { }
@CordovaInstance({sync: true})
remove(): void { }
@CordovaInstance({sync: true})
getOverlays(): Array<GoogleMapsPolyline|GoogleMapsPolygon|GoogleMapsMarker> {return; }
}
2016-05-25 15:12:11 +08:00
export class GoogleMapsLatLng {
2016-05-26 05:40:00 +08:00
private _objectInstance: any;
2016-05-25 15:12:11 +08:00
constructor (public lat: string, public lng: string) {
2016-06-01 18:05:15 +08:00
this._objectInstance = new plugin.google.maps.LatLng(lat, lng);
2016-05-25 15:12:11 +08:00
}
@CordovaInstance({
sync: true
})
equals (other: GoogleMapsLatLng): boolean {return; }
@CordovaInstance({
sync: true
})
toString (): string {return; }
@CordovaInstance({
sync: true
})
toUrlValue (precision?: number): string {return; }
2016-05-25 15:31:27 +08:00
}