1018 lines
21 KiB
TypeScript
Raw Normal View History

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