2016-05-26 04:43:18 +08:00
|
|
|
// Notes:
|
|
|
|
// - The way I'm listening to events might not work. Might need to switch
|
|
|
|
// - I'm assuming that the sub objects do need a constructor, so I'm using the constructor for other purposes
|
|
|
|
|
2016-04-30 11:56:49 +08:00
|
|
|
import {Cordova, Plugin} from './plugin';
|
2016-05-21 04:59:18 +08:00
|
|
|
import {Observable} from 'rxjs/Rx';
|
2016-04-30 11:56:49 +08:00
|
|
|
import {CordovaInstance} from './plugin';
|
2016-03-29 18:50:03 +08:00
|
|
|
/**
|
|
|
|
* Created by Ibrahim on 3/29/2016.
|
|
|
|
*/
|
2016-04-30 11:56:49 +08:00
|
|
|
declare var plugin: any;
|
2016-03-29 18:50:03 +08:00
|
|
|
/**
|
|
|
|
* @name Google Maps
|
2016-05-25 12:53:35 +08:00
|
|
|
* @description This plugin uses the native Google Maps SDK
|
|
|
|
* @usage
|
|
|
|
* ```
|
|
|
|
* import {GoogleMaps} from 'ionic-native';
|
|
|
|
*
|
|
|
|
* ...
|
|
|
|
*
|
|
|
|
* // somewhere in your component
|
|
|
|
* let map = new GoogleMaps('elementID');
|
|
|
|
*
|
|
|
|
* map.onInit().subscribe(() => console.log("Map is ready!"));
|
|
|
|
* ```
|
2016-03-29 18:50:03 +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-03-29 18:50:03 +08:00
|
|
|
})
|
|
|
|
export class GoogleMaps {
|
|
|
|
|
2016-04-30 11:56:49 +08:00
|
|
|
private _objectInstance: any;
|
2016-03-29 18:50:03 +08:00
|
|
|
|
2016-05-25 15:12:11 +08:00
|
|
|
/**
|
|
|
|
* Checks if a map object has been created.
|
|
|
|
* @return {Promise<GoogleMaps>} returns a promise that resolves with the Map object (if it exists).
|
|
|
|
*/
|
|
|
|
@Cordova()
|
|
|
|
static isAvailable (): Promise<GoogleMaps> {return; }
|
|
|
|
|
2016-04-30 11:56:49 +08:00
|
|
|
constructor (elementId: string) {
|
2016-04-30 10:47:01 +08:00
|
|
|
this._objectInstance = plugin.google.maps.Map.getMap(document.getElementById(elementId));
|
2016-03-29 18:50:03 +08:00
|
|
|
}
|
|
|
|
|
2016-05-25 15:12:11 +08:00
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the user clicks on the map. (Event: MAP_CLICK)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_CLICK'
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onMapClick (): Observable<GoogleMapsLatLng> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the user long-clicks on the map. (Event: MAP_LONG_CLICK)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_LONG_CLICK'
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onMapLongClick (): Observable<GoogleMapsLatLng> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the user clicks the `My Location` button. (Event: MY_LOCATION_BUTTON_CLICK)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MY_LOCATION_BUTTON_CLICK'
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onMyLocationButtonClick (): Observable<any> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the user changes the view. (Event: CAMERA_CHANGE)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.CAMERA_CHANGE'
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onCameraChange (): Observable<any> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the view is on idle. (Event: CAMERA_IDLE)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.CAMERA_IDLE',
|
|
|
|
platforms: ['iOS']
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onCameraIdle (): Observable<any> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the map is ready. (Event: MAP_READY)
|
|
|
|
*/
|
2016-03-29 18:50:03 +08:00
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_READY'
|
|
|
|
})
|
2016-05-25 15:12:11 +08:00
|
|
|
static onMapReady (): Observable<GoogleMaps> {return; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the map is loaded. (Event: MAP_LOADED)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_LOADED',
|
|
|
|
platforms: ['Android']
|
|
|
|
})
|
|
|
|
static onMapLoaded (): Observable<GoogleMaps> {return; }
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the map will move. (Event: MAP_WILL_MOVE)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_WILL_MOVE',
|
|
|
|
platforms: ['iOS']
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onMapWillMove (): Observable<any> {return; }
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get notified via an Observable when the user closes the map. (Event: MAP_CLOSE)
|
|
|
|
*/
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_CLOSE'
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
static onMapClose (): Observable<any> {return; }
|
2016-03-29 18:50:03 +08:00
|
|
|
|
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-04-30 11:56:49 +08:00
|
|
|
setDebuggable (isDebuggable: boolean): void {}
|
2016-03-29 18:50:03 +08:00
|
|
|
|
2016-05-25 15:12:11 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-04-30 11:56:49 +08:00
|
|
|
setClickable (isClickable: boolean): void {}
|
2016-03-29 18:50:03 +08:00
|
|
|
|
2016-05-25 15:12:11 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
|
|
|
animateCamera (options: AnimateCameraOptions): void {return; }
|
|
|
|
|
|
|
|
/**
|
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-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addMarker (options: any): void { }
|
|
|
|
|
2016-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addCircle (options: any): void { }
|
|
|
|
|
2016-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addPolygon (options: any): void { }
|
|
|
|
|
2016-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addPolyline (options: any): void { }
|
|
|
|
|
2016-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addTileOverlay (options: any): void { }
|
|
|
|
|
2016-05-25 15:32:05 +08:00
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-05-25 15:31:27 +08:00
|
|
|
addGroundOverlay (options: any): void { }
|
|
|
|
|
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 {
|
|
|
|
target: string;
|
|
|
|
tilt: number;
|
|
|
|
zoom: number;
|
|
|
|
bearing: number;
|
|
|
|
duration: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface CameraPosition {
|
|
|
|
target: {
|
|
|
|
lat: string;
|
|
|
|
lng: string;
|
|
|
|
};
|
|
|
|
zoom: number;
|
|
|
|
tilt: number;
|
|
|
|
bearing: number;
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface MyLocation {
|
|
|
|
latLng: {
|
|
|
|
lat: string;
|
|
|
|
lng: string;
|
|
|
|
};
|
|
|
|
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 {
|
|
|
|
northeast: any;
|
|
|
|
southwest: any;
|
|
|
|
}
|
|
|
|
|
2016-05-25 15:52:00 +08:00
|
|
|
/**
|
|
|
|
* @private
|
|
|
|
* Marker object
|
|
|
|
*/
|
|
|
|
@Plugin({
|
|
|
|
pluginRef: 'plugin.google.maps.Marker',
|
|
|
|
plugin: 'cordova-plugin-googlemaps',
|
|
|
|
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps'
|
|
|
|
})
|
2016-05-26 04:43:18 +08:00
|
|
|
export class GoogleMapsMarker {
|
2016-05-25 15:52:00 +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 04:43:18 +08:00
|
|
|
constructor (private _objectInstance: any) { }
|
|
|
|
|
|
|
|
@CordovaInstance()
|
|
|
|
getPosition (): Promise<Position> {return; }
|
|
|
|
|
|
|
|
@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
|
|
|
|
})
|
|
|
|
getMap(): GoogleMaps {return; }
|
|
|
|
|
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
|
|
|
setAnimation(animation: string): void { }
|
|
|
|
|
|
|
|
|
2016-05-25 15:52:00 +08:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface GoogleMapsMarkerIcon {
|
|
|
|
url: string;
|
|
|
|
size: {
|
|
|
|
width: number;
|
|
|
|
height: number;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-25 15:12:11 +08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @private
|
|
|
|
Google Maps LatLng
|
|
|
|
**/
|
|
|
|
@Plugin({
|
2016-05-25 15:52:00 +08:00
|
|
|
pluginRef: 'plugin.google.maps.LatLng',
|
2016-05-25 15:12:11 +08:00
|
|
|
plugin: 'cordova-plugin-googlemaps',
|
|
|
|
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps'
|
|
|
|
})
|
|
|
|
export class GoogleMapsLatLng {
|
|
|
|
constructor (public lat: string, public lng: string) {
|
|
|
|
return plugin.google.maps.LatLng(lat, lng);
|
|
|
|
}
|
|
|
|
|
|
|
|
@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
|
|
|
}
|
|
|
|
|
|
|
|
|