diff --git a/src/@ionic-native/plugins/google-maps/index.ts b/src/@ionic-native/plugins/google-maps/index.ts index 3d875b2b5..d776ba537 100644 --- a/src/@ionic-native/plugins/google-maps/index.ts +++ b/src/@ionic-native/plugins/google-maps/index.ts @@ -1,16 +1,29 @@ -import { Injectable } from '@angular/core'; -import { CordovaCheck, CordovaInstance, Plugin, InstanceProperty, InstanceCheck, checkAvailability, IonicNativePlugin } from '@ionic-native/core'; -import { Observable } from 'rxjs/Observable'; import 'rxjs/add/observable/fromEvent'; +import { Injectable } from '@angular/core'; +import { + checkAvailability, + CordovaCheck, + CordovaInstance, + InstanceCheck, + InstanceProperty, + IonicNativePlugin, + Plugin +} from '@ionic-native/core'; +import { Observable } from 'rxjs/Observable'; -export type MapType = 'MAP_TYPE_NORMAL' | 'MAP_TYPE_ROADMAP' | 'MAP_TYPE_SATELLITE' | 'MAP_TYPE_HYBRID' | 'MAP_TYPE_TERRAIN' | 'MAP_TYPE_NONE'; +export type MapType = + | 'MAP_TYPE_NORMAL' + | 'MAP_TYPE_ROADMAP' + | 'MAP_TYPE_SATELLITE' + | 'MAP_TYPE_HYBRID' + | 'MAP_TYPE_TERRAIN' + | 'MAP_TYPE_NONE'; /** * @hidden */ export class LatLng implements ILatLng { - lat: number; lng: number; @@ -43,12 +56,11 @@ export interface ILatLngBounds { * @hidden */ export class LatLngBounds implements ILatLngBounds { - private _objectInstance: any; - @InstanceProperty northeast: ILatLng; - @InstanceProperty southwest: ILatLng; - @InstanceProperty type: string; + @InstanceProperty() northeast: ILatLng; + @InstanceProperty() southwest: ILatLng; + @InstanceProperty() type: string; constructor(points?: ILatLng[]) { this._objectInstance = new (GoogleMaps.getPlugin()).LatLngBounds(points); @@ -59,7 +71,9 @@ export class LatLngBounds implements ILatLngBounds { * @return {string} */ @CordovaInstance({ sync: true }) - toString(): string { return; } + toString(): string { + return; + } /** * Returns a string of the form "lat_sw,lng_sw,lat_ne,lng_ne" for this bounds, where "sw" corresponds to the southwest corner of the bounding box, while "ne" corresponds to the northeast corner of that box. @@ -67,7 +81,9 @@ export class LatLngBounds implements ILatLngBounds { * @return {string} */ @CordovaInstance({ sync: true }) - toUrlValue(precision?: number): string { return; } + toUrlValue(precision?: number): string { + return; + } /** * Extends this bounds to contain the given point. @@ -81,18 +97,21 @@ export class LatLngBounds implements ILatLngBounds { * @param LatLng {ILatLng} */ @CordovaInstance({ sync: true }) - contains(LatLng: ILatLng): boolean { return; } + contains(LatLng: ILatLng): boolean { + return; + } /** * Computes the center of this LatLngBounds * @return {LatLng} */ @CordovaInstance({ sync: true }) - getCenter(): LatLng { return; } + getCenter(): LatLng { + return; + } } export interface GoogleMapControlOptions { - /** * Turns the compass on or off. */ @@ -132,7 +151,6 @@ export interface GoogleMapControlOptions { } export interface GoogleMapGestureOptions { - /** * Set false to disable the scroll gesture (default: true) */ @@ -172,7 +190,6 @@ export interface GoogleMapPaddingOptions { } export interface GoogleMapPreferenceOptions { - /** * Minimum and maximum zoom levels for zooming gestures. */ @@ -195,7 +212,6 @@ export interface GoogleMapPreferenceOptions { } export interface GoogleMapOptions { - /** * mapType [options] */ @@ -328,7 +344,6 @@ export interface CircleOptions { } export interface GeocoderRequest { - /** * The address property or position property is required. * You can not specify both property at the same time. @@ -375,7 +390,7 @@ export interface GeocoderResult { lines?: Array; permises?: string; phone?: string; - url?: string + url?: string; }; locale?: string; locality?: string; @@ -732,7 +747,6 @@ export interface ToDataUrlOptions { uncompress?: boolean; } - /** * Options for map.addKmlOverlay() method */ @@ -758,7 +772,6 @@ export interface KmlOverlayOptions { [key: string]: any; } - /** * @hidden */ @@ -769,41 +782,55 @@ export class VisibleRegion implements ILatLngBounds { * The northeast of the bounds that contains the farLeft, farRight, nearLeft and nearRight. * Since the map view is able to rotate, the farRight is not the same as the northeast. */ - @InstanceProperty northeast: ILatLng; + @InstanceProperty() northeast: ILatLng; /** * The southwest of the bounds that contains the farLeft, farRight, nearLeft and nearRight. * Since the map view is able to rotate, the nearLeft is not the same as the southwest. */ - @InstanceProperty southwest: ILatLng; + @InstanceProperty() southwest: ILatLng; /** * The nearRight indicates the lat/lng of the top-left of the map view. */ - @InstanceProperty farLeft: ILatLng; + @InstanceProperty() farLeft: ILatLng; /** * The nearRight indicates the lat/lng of the top-right of the map view. */ - @InstanceProperty farRight: ILatLng; + @InstanceProperty() farRight: ILatLng; /** * The nearRight indicates the lat/lng of the bottom-left of the map view. */ - @InstanceProperty nearLeft: ILatLng; + @InstanceProperty() nearLeft: ILatLng; /** * The nearRight indicates the lat/lng of the bottom-right of the map view. */ - @InstanceProperty nearRight: ILatLng; + @InstanceProperty() nearRight: ILatLng; /** * constant value : `VisibleRegion` */ - @InstanceProperty type: string; + @InstanceProperty() type: string; - constructor(southwest: LatLngBounds, northeast: LatLngBounds, farLeft: ILatLng, farRight: ILatLng, nearLeft: ILatLng, nearRight: ILatLng) { - this._objectInstance = new (GoogleMaps.getPlugin()).VisibleRegion(southwest, northeast, farLeft, farRight, nearLeft, nearRight); + constructor( + southwest: LatLngBounds, + northeast: LatLngBounds, + farLeft: ILatLng, + farRight: ILatLng, + nearLeft: ILatLng, + nearRight: ILatLng + ) { + this._objectInstance = new (GoogleMaps.getPlugin()).VisibleRegion( + southwest, + northeast, + farLeft, + farRight, + nearLeft, + nearRight + ); } /** @@ -811,7 +838,9 @@ export class VisibleRegion implements ILatLngBounds { * @return {string} */ @CordovaInstance({ sync: true }) - toString(): string { return; } + toString(): string { + return; + } /** * Returns a string of the form "lat_sw,lng_sw,lat_ne,lng_ne" for this bounds, where "sw" corresponds to the southwest corner of the bounding box, while "ne" corresponds to the northeast corner of that box. @@ -819,16 +848,18 @@ export class VisibleRegion implements ILatLngBounds { * @return {string} */ @CordovaInstance({ sync: true }) - toUrlValue(precision?: number): string { return; } - + toUrlValue(precision?: number): string { + return; + } /** * Returns true if the given lat/lng is in this bounds. * @param LatLng {ILatLng} */ @CordovaInstance({ sync: true }) - contains(LatLng: ILatLng): boolean { return; } - + contains(LatLng: ILatLng): boolean { + return; + } } /** @@ -869,7 +900,7 @@ export const GoogleMapsEvent = { /** * @hidden */ -export const GoogleMapsAnimation: { [animationName: string]: string; } = { +export const GoogleMapsAnimation: { [animationName: string]: string } = { BOUNCE: 'BOUNCE', DROP: 'DROP' }; @@ -877,7 +908,7 @@ export const GoogleMapsAnimation: { [animationName: string]: string; } = { /** * @hidden */ -export const GoogleMapsMapTypeId: { [mapType: string]: MapType; } = { +export const GoogleMapsMapTypeId: { [mapType: string]: MapType } = { NORMAL: 'MAP_TYPE_NORMAL', ROADMAP: 'MAP_TYPE_ROADMAP', SATELLITE: 'MAP_TYPE_SATELLITE', @@ -1004,24 +1035,32 @@ export const GoogleMapsMapTypeId: { [mapType: string]: MapType; } = { pluginRef: 'plugin.google.maps', plugin: 'cordova-plugin-googlemaps', repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps', - document: 'https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md', - install: 'ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"', + document: + 'https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/README.md', + install: + 'ionic cordova plugin add cordova-plugin-googlemaps --variable API_KEY_FOR_ANDROID="YOUR_ANDROID_API_KEY_IS_HERE" --variable API_KEY_FOR_IOS="YOUR_IOS_API_KEY_IS_HERE"', installVariables: ['API_KEY_FOR_ANDROID', 'API_KEY_FOR_IOS'], platforms: ['Android', 'iOS'] }) @Injectable() export class GoogleMaps extends IonicNativePlugin { - /** * Creates a new GoogleMap instance * @param element {string | HTMLElement} Element ID or reference to attach the map to * @param options {GoogleMapOptions} [options] Options * @return {GoogleMap} */ - static create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap { + static create( + element: string | HTMLElement | GoogleMapOptions, + options?: GoogleMapOptions + ): GoogleMap { if (element instanceof HTMLElement) { if (element.getAttribute('__pluginMapId')) { - console.error('GoogleMaps', element.tagName + '[__pluginMapId=\'' + element.getAttribute('__pluginMapId') + '\'] has already map.'); + console.error( + `GoogleMaps ${element.tagName}[__pluginMapId='${element.getAttribute( + '__pluginMapId' + )}'] has already map.` + ); return; } } else if (typeof element === 'object') { @@ -1037,11 +1076,13 @@ export class GoogleMaps extends IonicNativePlugin { * @deprecation * @hidden */ - create(element: string | HTMLElement | GoogleMapOptions, options?: GoogleMapOptions): GoogleMap { + create( + element: string | HTMLElement | GoogleMapOptions, + options?: GoogleMapOptions + ): GoogleMap { console.error('GoogleMaps', '[deprecated] Please use GoogleMaps.create()'); return GoogleMaps.create(element, options); } - } /** @@ -1064,7 +1105,7 @@ export class BaseClass { */ @InstanceCheck({ observable: true }) addEventListener(eventName: string): Observable { - return new Observable((observer) => { + return new Observable(observer => { this._objectInstance.on(eventName, (...args: any[]) => { if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) { if (args[args.length - 1].type === 'Map') { @@ -1083,7 +1124,9 @@ export class BaseClass { } args[args.length - 1] = overlay; } else { - args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()]; + args[args.length - 1] = this._objectInstance + .getMap() + .get('_overlays')[args[args.length - 1].getId()]; } } observer.next(args); @@ -1098,7 +1141,7 @@ export class BaseClass { */ @InstanceCheck() addListenerOnce(eventName: string): Promise { - return new Promise((resolve) => { + return new Promise(resolve => { this._objectInstance.one(eventName, (...args: any[]) => { if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) { if (args[args.length - 1].type === 'Map') { @@ -1117,7 +1160,9 @@ export class BaseClass { } args[args.length - 1] = overlay; } else { - args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()]; + args[args.length - 1] = this._objectInstance + .getMap() + .get('_overlays')[args[args.length - 1].getId()]; } } resolve(args); @@ -1130,7 +1175,9 @@ export class BaseClass { * @param key {any} */ @CordovaInstance({ sync: true }) - get(key: string): any { return; } + get(key: string): any { + return; + } /** * Sets a value @@ -1139,7 +1186,7 @@ export class BaseClass { * @param noNotify {boolean} [options] True if you want to prevent firing the `(key)_changed` event. */ @CordovaInstance({ sync: true }) - set(key: string, value: any, noNotify?: boolean): void { } + set(key: string, value: any, noNotify?: boolean): void {} /** * Bind a key to another object @@ -1149,7 +1196,12 @@ export class BaseClass { * @param noNotify? {boolean} [options] True if you want to prevent `(key)_changed` event when you bind first time, because the internal status is changed from `undefined` to something. */ @CordovaInstance({ sync: true }) - bindTo(key: string, target: any, targetKey?: string, noNotify?: boolean): void { } + bindTo( + key: string, + target: any, + targetKey?: string, + noNotify?: boolean + ): void {} /** * Alias of `addEventListener` @@ -1158,7 +1210,7 @@ export class BaseClass { */ @InstanceCheck({ observable: true }) on(eventName: string): Observable { - return new Observable((observer) => { + return new Observable(observer => { this._objectInstance.on(eventName, (...args: any[]) => { if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) { if (args[args.length - 1].type === 'Map') { @@ -1177,7 +1229,9 @@ export class BaseClass { } args[args.length - 1] = overlay; } else { - args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()]; + args[args.length - 1] = this._objectInstance + .getMap() + .get('_overlays')[args[args.length - 1].getId()]; } } observer.next(args); @@ -1192,7 +1246,7 @@ export class BaseClass { */ @InstanceCheck() one(eventName: string): Promise { - return new Promise((resolve) => { + return new Promise(resolve => { this._objectInstance.one(eventName, (...args: any[]) => { if (args[args.length - 1] instanceof GoogleMaps.getPlugin().BaseClass) { if (args[args.length - 1].type === 'Map') { @@ -1211,7 +1265,9 @@ export class BaseClass { } args[args.length - 1] = overlay; } else { - args[args.length - 1] = this._objectInstance.getMap().get('_overlays')[args[args.length - 1].getId()]; + args[args.length - 1] = this._objectInstance + .getMap() + .get('_overlays')[args[args.length - 1].getId()]; } } resolve(args); @@ -1223,7 +1279,7 @@ export class BaseClass { * Clears all stored values */ @CordovaInstance({ sync: true }) - empty(): void { } + empty(): void {} /** * Dispatch event. @@ -1233,7 +1289,6 @@ export class BaseClass { @CordovaInstance({ sync: true }) trigger(eventName: string, ...parameters: any[]): void {} - /** * Executes off() and empty() */ @@ -1241,7 +1296,9 @@ export class BaseClass { destroy(): void { let map: GoogleMap = this._objectInstance.getMap(); if (map) { - delete this._objectInstance.getMap().get('_overlays')[this._objectInstance.getId()]; + delete this._objectInstance.getMap().get('_overlays')[ + this._objectInstance.getId() + ]; } this._objectInstance.remove(); } @@ -1260,7 +1317,10 @@ export class BaseClass { * @param listener {Function} [options] Event listener */ @CordovaInstance({ sync: true }) - removeEventListener(eventName?: string, listener?: (...parameters: any[]) => void): void {} + removeEventListener( + eventName?: string, + listener?: (...parameters: any[]) => void + ): void {} /** * Alias of `removeEventListener` @@ -1270,7 +1330,6 @@ export class BaseClass { */ @CordovaInstance({ sync: true }) off(eventName?: string, listener?: (...parameters: any[]) => void): void {} - } /** @@ -1284,13 +1343,14 @@ export class BaseClass { repo: '' }) export class BaseArrayClass extends BaseClass { - constructor(initialData?: T[] | any) { super(); if (initialData instanceof GoogleMaps.getPlugin().BaseArrayClass) { this._objectInstance = initialData; } else { - this._objectInstance = new (GoogleMaps.getPlugin().BaseArrayClass)(initialData); + this._objectInstance = new (GoogleMaps.getPlugin()).BaseArrayClass( + initialData + ); } } @@ -1314,8 +1374,10 @@ export class BaseArrayClass extends BaseClass { * @return {Promise} */ @CordovaCheck() - forEachAsync(fn: ((element: T, callback: () => void) => void)): Promise { - return new Promise((resolve) => { + forEachAsync( + fn: ((element: T, callback: () => void) => void) + ): Promise { + return new Promise(resolve => { this._objectInstance.forEachAsync(fn, resolve); }); } @@ -1327,7 +1389,9 @@ export class BaseArrayClass extends BaseClass { * @return {Array} returns a new array with the results */ @CordovaInstance({ sync: true }) - map(fn: (element: T, index: number) => any): any[] { return; } + map(fn: (element: T, index: number) => any): any[] { + return; + } /** * Iterate over each element, calling the provided callback. @@ -1337,8 +1401,10 @@ export class BaseArrayClass extends BaseClass { * @return {Promise} returns a new array with the results */ @CordovaCheck() - mapAsync(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise { - return new Promise((resolve) => { + mapAsync( + fn: ((element: T, callback: (newElement: any) => void) => void) + ): Promise { + return new Promise(resolve => { this._objectInstance.mapAsync(fn, resolve); }); } @@ -1350,8 +1416,10 @@ export class BaseArrayClass extends BaseClass { * @return {Promise} returns a new array with the results */ @CordovaCheck() - mapSeries(fn: ((element: T, callback: (newElement: any) => void) => void)): Promise { - return new Promise((resolve) => { + mapSeries( + fn: ((element: T, callback: (newElement: any) => void) => void) + ): Promise { + return new Promise(resolve => { this._objectInstance.mapSeries(fn, resolve); }); } @@ -1362,7 +1430,9 @@ export class BaseArrayClass extends BaseClass { * @return {Array} returns a new filtered array */ @CordovaInstance({ sync: true }) - filter(fn: (element: T, index: number) => boolean): T[] { return; } + filter(fn: (element: T, index: number) => boolean): T[] { + return; + } /** * The filterAsync() method creates a new array with all elements that pass the test implemented by the provided function. @@ -1371,8 +1441,10 @@ export class BaseArrayClass extends BaseClass { * @return {Promise} returns a new filtered array */ @CordovaCheck() - filterAsync(fn: (element: T, callback: (result: boolean) => void) => void): Promise { - return new Promise((resolve) => { + filterAsync( + fn: (element: T, callback: (result: boolean) => void) => void + ): Promise { + return new Promise(resolve => { this._objectInstance.filterAsync(fn, resolve); }); } @@ -1382,7 +1454,9 @@ export class BaseArrayClass extends BaseClass { * @return {Array} */ @CordovaInstance({ sync: true }) - getArray(): T[] { return; } + getArray(): T[] { + return; + } /** * Returns the element at the specified index. @@ -1397,7 +1471,9 @@ export class BaseArrayClass extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getLength(): number { return; } + getLength(): number { + return; + } /** * The indexOf() method returns the first index at which a given element can be found in the array, or -1 if it is not present. @@ -1405,7 +1481,9 @@ export class BaseArrayClass extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - indexOf(element: T): number { return; } + indexOf(element: T): number { + return; + } /** * The reverse() method reverses an array in place. @@ -1435,7 +1513,9 @@ export class BaseArrayClass extends BaseClass { * @return {Object} */ @CordovaInstance({ sync: true }) - pop(noNotify?: boolean): T { return; } + pop(noNotify?: boolean): T { + return; + } /** * Adds one element to the end of the array and returns the new length of the array. @@ -1468,7 +1548,6 @@ export class BaseArrayClass extends BaseClass { * https://github.com/mapsplugin/cordova-plugin-googlemaps-doc/blob/master/v2.0.0/class/Circle/README.md */ export class Circle extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -1482,13 +1561,17 @@ export class Circle extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Change the center position. @@ -1502,14 +1585,18 @@ export class Circle extends BaseClass { * @return {ILatLng} */ @CordovaInstance({ sync: true }) - getCenter(): ILatLng { return; } + getCenter(): ILatLng { + return; + } /** * Return the current circle radius. * @return {number} */ @CordovaInstance({ sync: true }) - getRadius(): number { return; } + getRadius(): number { + return; + } /** * Change the circle radius. @@ -1530,7 +1617,9 @@ export class Circle extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getFillColor(): string { return; } + getFillColor(): string { + return; + } /** * Change the stroke width. @@ -1544,7 +1633,9 @@ export class Circle extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getStrokeWidth(): number { return; } + getStrokeWidth(): number { + return; + } /** * Change the stroke color (outter color). @@ -1558,7 +1649,9 @@ export class Circle extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getStrokeColor(): string { return; } + getStrokeColor(): string { + return; + } /** * Change clickablity of the circle. @@ -1572,7 +1665,9 @@ export class Circle extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getClickable(): boolean { return; } + getClickable(): boolean { + return; + } /** * Change the circle zIndex order. @@ -1586,7 +1681,9 @@ export class Circle extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Remove the circle. @@ -1599,7 +1696,9 @@ export class Circle extends BaseClass { * @return {LatLngBounds} */ @CordovaInstance({ sync: true }) - getBounds(): LatLngBounds { return; } + getBounds(): LatLngBounds { + return; + } /** * Set circle visibility @@ -1613,7 +1712,9 @@ export class Circle extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } } /** @@ -1626,14 +1727,15 @@ export class Circle extends BaseClass { repo: '' }) export class Environment { - /** * Get the open source software license information for Google Maps SDK for iOS. * @return {Promise} */ static getLicenseInfo(): Promise { - return new Promise((resolve) => { - GoogleMaps.getPlugin().environment.getLicenseInfo((text: string) => resolve(text)); + return new Promise(resolve => { + GoogleMaps.getPlugin().environment.getLicenseInfo((text: string) => + resolve(text) + ); }); } @@ -1642,7 +1744,10 @@ export class Environment { * @hidden */ getLicenseInfo(): Promise { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Environment.getLicenseInfo()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Environment.getLicenseInfo()' + ); return Environment.getLicenseInfo(); } @@ -1659,7 +1764,10 @@ export class Environment { * @hidden */ setBackgroundColor(color: string): void { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Environment.setBackgroundColor()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Environment.setBackgroundColor()' + ); Environment.setBackgroundColor(color); } } @@ -1674,13 +1782,17 @@ export class Environment { repo: '' }) export class Geocoder { - /** * @deprecation * @hidden */ - geocode(request: GeocoderRequest): Promise> { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Geocoder.geocode()'); + geocode( + request: GeocoderRequest + ): Promise> { + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Geocoder.geocode()' + ); return Geocoder.geocode(request); } @@ -1689,10 +1801,15 @@ export class Geocoder { * @param {GeocoderRequest} request Request object with either an address or a position * @return {Promise>} */ - static geocode(request: GeocoderRequest): Promise> { - - if (request.address instanceof Array || Array.isArray(request.address) || - request.position instanceof Array || Array.isArray(request.position)) { + static geocode( + request: GeocoderRequest + ): Promise> { + if ( + request.address instanceof Array || + Array.isArray(request.address) || + request.position instanceof Array || + Array.isArray(request.position) + ) { // ------------------------- // Geocoder.geocode({ // address: [ @@ -1717,13 +1834,16 @@ export class Geocoder { // }) // ------------------------- return new Promise((resolve, reject) => { - GoogleMaps.getPlugin().Geocoder.geocode(request, (results: GeocoderResult[]) => { - if (results) { - resolve(results); - } else { - reject(); + GoogleMaps.getPlugin().Geocoder.geocode( + request, + (results: GeocoderResult[]) => { + if (results) { + resolve(results); + } else { + reject(); + } } - }); + ); }); } } @@ -1739,7 +1859,6 @@ export class Geocoder { repo: '' }) export class LocationService { - /** * Get the current device location without map * @return {Promise} @@ -1761,13 +1880,15 @@ export class LocationService { repo: '' }) export class Encoding { - /** * @deprecation * @hidden */ decodePath(encoded: string, precision?: number): Array { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Encoding.decodePath()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Encoding.decodePath()' + ); return Encoding.decodePath(encoded, precision); } @@ -1776,7 +1897,10 @@ export class Encoding { * @hidden */ encodePath(path: Array | BaseArrayClass): string { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Encoding.encodePath()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Encoding.encodePath()' + ); return Encoding.encodePath(path); } @@ -1787,7 +1911,10 @@ export class Encoding { * @return {ILatLng[]} */ static decodePath(encoded: string, precision?: number): Array { - return GoogleMaps.getPlugin().geometry.encoding.decodePath(encoded, precision); + return GoogleMaps.getPlugin().geometry.encoding.decodePath( + encoded, + precision + ); } /** @@ -1810,7 +1937,6 @@ export class Encoding { repo: '' }) export class Poly { - /** * Returns true if the speicified location is in the polygon path * @param location {ILatLng} @@ -1818,7 +1944,10 @@ export class Poly { * @return {boolean} */ static containsLocation(location: ILatLng, path: ILatLng[]): boolean { - return GoogleMaps.getPlugin().geometry.poly.containsLocation(location, path); + return GoogleMaps.getPlugin().geometry.poly.containsLocation( + location, + path + ); } /** @@ -1828,7 +1957,10 @@ export class Poly { * @return {boolean} */ static isLocationOnEdge(location: ILatLng, path: ILatLng[]): boolean { - return GoogleMaps.getPlugin().geometry.poly.isLocationOnEdge(location, path); + return GoogleMaps.getPlugin().geometry.poly.isLocationOnEdge( + location, + path + ); } } @@ -1842,13 +1974,15 @@ export class Poly { repo: '' }) export class Spherical { - /** * @deprecation * @hidden */ computeDistanceBetween(from: ILatLng, to: ILatLng): number { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeDistanceBetween()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeDistanceBetween()' + ); return Spherical.computeDistanceBetween(from, to); } @@ -1857,7 +1991,10 @@ export class Spherical { * @hidden */ computeOffset(from: ILatLng, distance: number, heading: number): LatLng { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeOffset()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeOffset()' + ); return Spherical.computeOffset(from, distance, heading); } @@ -1866,7 +2003,10 @@ export class Spherical { * @hidden */ computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeOffsetOrigin()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeOffsetOrigin()' + ); return Spherical.computeOffsetOrigin(to, distance, heading); } @@ -1875,7 +2015,10 @@ export class Spherical { * @hidden */ computeLength(path: Array | BaseArrayClass): number { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeLength()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeLength()' + ); return Spherical.computeLength(path); } @@ -1884,7 +2027,10 @@ export class Spherical { * @hidden */ computeArea(path: Array | BaseArrayClass): number { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeArea()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeArea()' + ); return Spherical.computeArea(path); } @@ -1893,7 +2039,10 @@ export class Spherical { * @hidden */ computeSignedArea(path: Array | BaseArrayClass): number { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeSignedArea()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeSignedArea()' + ); return Spherical.computeSignedArea(path); } @@ -1902,7 +2051,10 @@ export class Spherical { * @hidden */ computeHeading(from: ILatLng, to: ILatLng): number { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.computeHeading()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.computeHeading()' + ); return Spherical.computeHeading(from, to); } @@ -1911,16 +2063,13 @@ export class Spherical { * @hidden */ interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng { - console.error('GoogleMaps', '[deprecated] This method is static. Please use Spherical.interpolate()'); + console.error( + 'GoogleMaps', + '[deprecated] This method is static. Please use Spherical.interpolate()' + ); return Spherical.interpolate(from, to, fraction); } - - - - - - /** * Returns the distance, in meters, between two LatLngs. * @param locationA {ILatLng} @@ -1928,7 +2077,10 @@ export class Spherical { * @return {number} */ static computeDistanceBetween(from: ILatLng, to: ILatLng): number { - return GoogleMaps.getPlugin().geometry.spherical.computeDistanceBetween(from, to); + return GoogleMaps.getPlugin().geometry.spherical.computeDistanceBetween( + from, + to + ); } /** @@ -1938,8 +2090,16 @@ export class Spherical { * @param heading {number} * @return {LatLng} */ - static computeOffset(from: ILatLng, distance: number, heading: number): LatLng { - return GoogleMaps.getPlugin().geometry.spherical.computeOffset(from, distance, heading); + static computeOffset( + from: ILatLng, + distance: number, + heading: number + ): LatLng { + return GoogleMaps.getPlugin().geometry.spherical.computeOffset( + from, + distance, + heading + ); } /** @@ -1949,8 +2109,16 @@ export class Spherical { * @param heading {number} The heading in degrees clockwise from north. * @return {LatLng} */ - static computeOffsetOrigin(to: ILatLng, distance: number, heading: number): LatLng { - return GoogleMaps.getPlugin().geometry.spherical.computeOffsetOrigin(to, distance, heading); + static computeOffsetOrigin( + to: ILatLng, + distance: number, + heading: number + ): LatLng { + return GoogleMaps.getPlugin().geometry.spherical.computeOffsetOrigin( + to, + distance, + heading + ); } /** @@ -1976,7 +2144,9 @@ export class Spherical { * @param path {Array | BaseArrayClass}. * @return {number} */ - static computeSignedArea(path: Array | BaseArrayClass): number { + static computeSignedArea( + path: Array | BaseArrayClass + ): number { return GoogleMaps.getPlugin().geometry.spherical.computeSignedArea(path); } @@ -1998,7 +2168,11 @@ export class Spherical { * @return {LatLng} */ static interpolate(from: ILatLng, to: ILatLng, fraction: number): LatLng { - return GoogleMaps.getPlugin().geometry.spherical.interpolate(from, to, fraction); + return GoogleMaps.getPlugin().geometry.spherical.interpolate( + from, + to, + fraction + ); } } @@ -2012,17 +2186,30 @@ export class Spherical { export class GoogleMap extends BaseClass { constructor(element: string | HTMLElement, options?: GoogleMapOptions) { super(); - if (checkAvailability(GoogleMaps.getPluginRef(), null, GoogleMaps.getPluginName()) === true) { + if ( + checkAvailability( + GoogleMaps.getPluginRef(), + null, + GoogleMaps.getPluginName() + ) === true + ) { if (element instanceof HTMLElement) { - this._objectInstance = GoogleMaps.getPlugin().Map.getMap(element, options); + this._objectInstance = GoogleMaps.getPlugin().Map.getMap( + element, + options + ); } else if (typeof element === 'string') { - let dummyObj: any = new (GoogleMaps.getPlugin().BaseClass)(); + let dummyObj: any = new (GoogleMaps.getPlugin()).BaseClass(); this._objectInstance = dummyObj; let onListeners: any[] = []; let oneListeners: any[] = []; let _origAddEventListener: any = this._objectInstance.addEventListener; - let _origAddEventListenerOnce: any = this._objectInstance.addEventListenerOnce; - this._objectInstance.addEventListener = (eventName: string, fn: () => void) => { + let _origAddEventListenerOnce: any = this._objectInstance + .addEventListenerOnce; + this._objectInstance.addEventListener = ( + eventName: string, + fn: () => void + ) => { if (eventName === GoogleMapsEvent.MAP_READY) { _origAddEventListener.call(dummyObj, eventName, fn); } else { @@ -2031,7 +2218,10 @@ export class GoogleMap extends BaseClass { }; this._objectInstance.on = this._objectInstance.addEventListener; - this._objectInstance.addEventListenerOnce = (eventName: string, fn: () => void) => { + this._objectInstance.addEventListenerOnce = ( + eventName: string, + fn: () => void + ) => { if (eventName === GoogleMapsEvent.MAP_READY) { _origAddEventListenerOnce.call(dummyObj, eventName, fn); } else { @@ -2039,7 +2229,7 @@ export class GoogleMap extends BaseClass { } }; this._objectInstance.one = this._objectInstance.addEventListenerOnce; - (new Promise((resolve, reject) => { + new Promise((resolve, reject) => { let count: number = 0; let timer: any = setInterval(() => { let target = document.querySelector('.show-page #' + element); @@ -2056,23 +2246,26 @@ export class GoogleMap extends BaseClass { reject(); } }, 100); - })) - .then((target: any) => { - this._objectInstance = GoogleMaps.getPlugin().Map.getMap(target, options); - this._objectInstance.one(GoogleMapsEvent.MAP_READY, () => { - this.set('_overlays', {}); - onListeners.forEach((args) => { - this.on.apply(this, args); - }); - oneListeners.forEach((args) => { - this.one.apply(this, args); - }); - dummyObj.trigger(GoogleMapsEvent.MAP_READY); - }); }) - .catch(() => { - this._objectInstance = null; - }); + .then((target: any) => { + this._objectInstance = GoogleMaps.getPlugin().Map.getMap( + target, + options + ); + this._objectInstance.one(GoogleMapsEvent.MAP_READY, () => { + this.set('_overlays', {}); + onListeners.forEach(args => { + this.on.apply(this, args); + }); + oneListeners.forEach(args => { + this.one.apply(this, args); + }); + dummyObj.trigger(GoogleMapsEvent.MAP_READY); + }); + }) + .catch(() => { + this._objectInstance = null; + }); } else if (element === null && options) { this._objectInstance = GoogleMaps.getPlugin().Map.getMap(null, options); } @@ -2086,7 +2279,9 @@ export class GoogleMap extends BaseClass { @InstanceCheck() setDiv(domNode?: HTMLElement | string): void { if (typeof domNode === 'string') { - this._objectInstance.setDiv(document.querySelector('.show-page #' + domNode)); + this._objectInstance.setDiv( + document.querySelector('.show-page #' + domNode) + ); } else { this._objectInstance.setDiv(domNode); } @@ -2097,98 +2292,122 @@ export class GoogleMap extends BaseClass { * @return {HTMLElement} */ @CordovaInstance({ sync: true }) - getDiv(): HTMLElement { return; } + getDiv(): HTMLElement { + return; + } /** * Changes the map type id * @param mapTypeId {string} */ @CordovaInstance({ sync: true }) - setMapTypeId(mapTypeId: MapType): void { } + setMapTypeId(mapTypeId: MapType): void {} /** * Moves the camera with animation * @return {Promise} */ @CordovaInstance() - animateCamera(cameraPosition: CameraPosition): Promise { return; } + animateCamera(cameraPosition: CameraPosition): Promise { + return; + } /** * Zooming in the camera with animation * @return {Promise} */ @CordovaInstance() - animateCameraZoomIn(): Promise { return; } + animateCameraZoomIn(): Promise { + return; + } /** * Zooming out the camera with animation * @return {Promise} */ @CordovaInstance() - animateCameraZoomOut(): Promise { return; } + animateCameraZoomOut(): Promise { + return; + } /** * Moves the camera without animation * @return {Promise} */ @CordovaInstance() - moveCamera(cameraPosition: CameraPosition): Promise { return; } + moveCamera(cameraPosition: CameraPosition): Promise { + return; + } /** * Zooming in the camera without animation * @return {Promise} */ @CordovaInstance() - moveCameraZoomIn(): Promise { return; } + moveCameraZoomIn(): Promise { + return; + } /** * Zooming out the camera without animation * @return {Promise} */ @CordovaInstance() - moveCameraZoomOut(): Promise { return; } + moveCameraZoomOut(): Promise { + return; + } /** * Get the position of the camera. * @return {CameraPosition} */ @CordovaInstance({ sync: true }) - getCameraPosition(): CameraPosition { return; } + getCameraPosition(): CameraPosition { + return; + } /** * Get the current camera target position * @return {Promise} */ @CordovaInstance({ sync: true }) - getCameraTarget(): ILatLng { return; } + getCameraTarget(): ILatLng { + return; + } /** * Get the current camera zoom level * @return {number} */ @CordovaInstance({ sync: true }) - getCameraZoom(): number { return; } + getCameraZoom(): number { + return; + } /** * Get the current camera bearing * @return {number} */ @CordovaInstance({ sync: true }) - getCameraBearing(): number { return; } + getCameraBearing(): number { + return; + } /** * Get the current camera tilt (view angle) * @return {number} */ @CordovaInstance({ sync: true }) - getCameraTilt(): number { return; } + getCameraTilt(): number { + return; + } /** * Set the center position of the camera view * @param latLng {ILatLng | Array} */ @CordovaInstance({ sync: true }) - setCameraTarget(latLng: ILatLng | Array): void { } + setCameraTarget(latLng: ILatLng | Array): void {} /** * Set zoom level of the camera @@ -2217,21 +2436,25 @@ export class GoogleMap extends BaseClass { * @param y {any} */ @CordovaInstance({ sync: true }) - panBy(x: string | number, y: string | number): void { } + panBy(x: string | number, y: string | number): void {} /** * Get the current visible region (southWest and northEast) * @return {VisibleRegion} */ @CordovaInstance({ sync: true }) - getVisibleRegion(): VisibleRegion { return; } + getVisibleRegion(): VisibleRegion { + return; + } /** * Get the current device location * @return {Promise} */ @CordovaInstance() - getMyLocation(options?: MyLocationOptions): Promise { return; } + getMyLocation(options?: MyLocationOptions): Promise { + return; + } /** * Set false to ignore all clicks on the map @@ -2252,7 +2475,7 @@ export class GoogleMap extends BaseClass { delete this.get('_overlays')[overlayId]; }); } - return new Promise((resolve) => { + return new Promise(resolve => { this._objectInstance.remove(() => resolve()); }); } @@ -2269,7 +2492,7 @@ export class GoogleMap extends BaseClass { delete this.get('_overlays')[overlayId]; }); } - return new Promise((resolve) => { + return new Promise(resolve => { this._objectInstance.clear(() => resolve()); }); } @@ -2279,14 +2502,18 @@ export class GoogleMap extends BaseClass { * @return {Promise} */ @CordovaInstance() - fromLatLngToPoint(latLng: ILatLng): Promise { return; } + fromLatLngToPoint(latLng: ILatLng): Promise { + return; + } /** * Convert the unit from the pixels from the left/top to the LatLng * @return {Promise} */ @CordovaInstance() - fromPointToLatLng(point: any): Promise { return; } + fromPointToLatLng(point: any): Promise { + return; + } /** * Set true if you want to show the MyLocation control (blue dot) @@ -2307,7 +2534,9 @@ export class GoogleMap extends BaseClass { * @return {Promise} */ @CordovaInstance() - getFocusedBuilding(): Promise { return; } + getFocusedBuilding(): Promise { + return; + } /** * Set true if you want to show the indoor map @@ -2352,7 +2581,12 @@ export class GoogleMap extends BaseClass { * @param bottom {number} */ @CordovaInstance({ sync: true }) - setPadding(top?: number, right?: number, bottom?: number, left?: number): void { } + setPadding( + top?: number, + right?: number, + bottom?: number, + left?: number + ): void {} /** * Set options @@ -2394,7 +2628,9 @@ export class GoogleMap extends BaseClass { * @return {Promise} */ @InstanceCheck() - addMarkerCluster(options: MarkerClusterOptions): Promise { + addMarkerCluster( + options: MarkerClusterOptions + ): Promise { return new Promise((resolve, reject) => { this._objectInstance.addMarkerCluster(options, (markerCluster: any) => { if (markerCluster) { @@ -2530,7 +2766,9 @@ export class GoogleMap extends BaseClass { * @return {Promise} */ @InstanceCheck() - addGroundOverlay(options: GroundOverlayOptions): Promise { + addGroundOverlay( + options: GroundOverlayOptions + ): Promise { return new Promise((resolve, reject) => { this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => { if (groundOverlay) { @@ -2584,15 +2822,15 @@ export class GoogleMap extends BaseClass { * @return {Promise} */ @CordovaInstance() - toDataURL(params?: ToDataUrlOptions): Promise { return; } - + toDataURL(params?: ToDataUrlOptions): Promise { + return; + } } /** * @hidden */ export class GroundOverlay extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -2606,13 +2844,17 @@ export class GroundOverlay extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Change the bounds of the GroundOverlay @@ -2626,34 +2868,38 @@ export class GroundOverlay extends BaseClass { * @param bearing {number} */ @CordovaInstance({ sync: true }) - setBearing(bearing: number): void { } + setBearing(bearing: number): void {} /** * Return the current bearing value */ @CordovaInstance({ sync: true }) - getBearing(): number { return; } + getBearing(): number { + return; + } /** * Change the image of the ground overlay * @param image {string} URL of image */ @CordovaInstance({ sync: true }) - setImage(image: string): void {}; + setImage(image: string): void {} /** * Change the opacity of the ground overlay from 0.0 to 1.0 * @param opacity {number} */ @CordovaInstance({ sync: true }) - setOpacity(opacity: number): void { } + setOpacity(opacity: number): void {} /** * Return the current opacity * @return {number} */ @CordovaInstance({ sync: true }) - getOpacity(): number { return; } + getOpacity(): number { + return; + } /** * Change clickablity of the ground overlay @@ -2667,21 +2913,25 @@ export class GroundOverlay extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getClickable(): boolean { return; } + getClickable(): boolean { + return; + } /** * Change visibility of the ground overlay * @param visible {boolean} */ @CordovaInstance({ sync: true }) - setVisible(visible: boolean): void { } + setVisible(visible: boolean): void {} /** * Return true if the ground overlay is visible * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } /** * Change the ground overlay zIndex order @@ -2695,7 +2945,9 @@ export class GroundOverlay extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Remove the ground overlay @@ -2718,10 +2970,9 @@ export class GroundOverlay extends BaseClass { repo: '' }) export class HtmlInfoWindow extends BaseClass { - constructor() { super(); - this._objectInstance = new (GoogleMaps.getPlugin().HtmlInfoWindow)(); + this._objectInstance = new (GoogleMaps.getPlugin()).HtmlInfoWindow(); } /** @@ -2751,14 +3002,12 @@ export class HtmlInfoWindow extends BaseClass { */ @CordovaInstance() close(): void {} - } /** * @hidden */ export class Marker extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -2772,27 +3021,35 @@ export class Marker extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Set the marker position. * @param latLng {ILatLng} */ @CordovaInstance({ sync: true }) - setPosition(latLng: ILatLng): void { return; } + setPosition(latLng: ILatLng): void { + return; + } /** * Return the marker position. * @return {ILatLng} */ @CordovaInstance({ sync: true }) - getPosition(): ILatLng { return; } + getPosition(): ILatLng { + return; + } /** * Show the normal infoWindow of the marker. @@ -2831,7 +3088,9 @@ export class Marker extends BaseClass { * Return true if the marker is visible */ @CordovaInstance({ sync: true }) - isVisible(): boolean { return; } + isVisible(): boolean { + return; + } /** * Change title of the normal infoWindow. @@ -2845,7 +3104,9 @@ export class Marker extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getTitle(): string { return; } + getTitle(): string { + return; + } /** * Change snippet of the normal infoWindow. @@ -2859,7 +3120,9 @@ export class Marker extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getSnippet(): string { return; } + getSnippet(): string { + return; + } /** * Change the marker opacity from 0.0 to 1.0. @@ -2873,7 +3136,9 @@ export class Marker extends BaseClass { * @return {number} Opacity */ @CordovaInstance({ sync: true }) - getOpacity(): number { return; } + getOpacity(): number { + return; + } /** * Remove the marker. @@ -2906,14 +3171,18 @@ export class Marker extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - isInfoWindowShown(): boolean { return; } + isInfoWindowShown(): boolean { + return; + } /** * Return the marker hash code. * @return {string} Marker hash code */ @CordovaInstance({ sync: true }) - getHashCode(): string { return; } + getHashCode(): string { + return; + } /** * Higher zIndex value overlays will be drawn on top of lower zIndex value tile layers and overlays. @@ -2927,57 +3196,65 @@ export class Marker extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Set true if you allow all users to drag the marker. * @param draggable {boolean} */ @CordovaInstance({ sync: true }) - setDraggable(draggable: boolean): void { } + setDraggable(draggable: boolean): void {} /** * Return true if the marker drag is enabled. * @return {boolean} */ @CordovaInstance({ sync: true }) - isDraggable(): boolean { return; } + isDraggable(): boolean { + return; + } /** * Set true if you want to be flat marker. * @param flat {boolean} */ @CordovaInstance({ sync: true }) - setFlat(flat: boolean): void { return; } + setFlat(flat: boolean): void { + return; + } /** * Change icon url and/or size * @param icon */ @CordovaInstance({ sync: true }) - setIcon(icon: MarkerIcon): void { return; } + setIcon(icon: MarkerIcon): void { + return; + } /** * Set the marker rotation angle. * @param rotation {number} */ @CordovaInstance({ sync: true }) - setRotation(rotation: number): void { } + setRotation(rotation: number): void {} /** * Return the marker rotation angle. * @return {number} */ @CordovaInstance({ sync: true }) - getRotation(): number { return; } - + getRotation(): number { + return; + } } /** * @hidden */ export class MarkerCluster extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -2991,7 +3268,9 @@ export class MarkerCluster extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Add one marker location @@ -3023,15 +3302,15 @@ export class MarkerCluster extends BaseClass { * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } - + getMap(): GoogleMap { + return this._map; + } } /** * @hidden */ export class Polygon extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -3045,13 +3324,17 @@ export class Polygon extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Change the polygon points. @@ -3090,7 +3373,7 @@ export class Polygon extends BaseClass { results.push(hole); }); return results; - } + } /** * Change the filling color (inner color) @@ -3104,7 +3387,9 @@ export class Polygon extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getFillColor(): string { return; } + getFillColor(): string { + return; + } /** * Change the stroke color (outer color) @@ -3118,7 +3403,9 @@ export class Polygon extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getStrokeColor(): string { return; } + getStrokeColor(): string { + return; + } /** * Change clickablity of the polygon @@ -3131,7 +3418,9 @@ export class Polygon extends BaseClass { * Return true if the polygon is clickable */ @CordovaInstance({ sync: true }) - getClickable(): boolean { return; } + getClickable(): boolean { + return; + } /** * Change visibility of the polygon @@ -3145,7 +3434,9 @@ export class Polygon extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } /** * Change the polygon zIndex order. @@ -3159,7 +3450,9 @@ export class Polygon extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Remove the polygon. @@ -3181,7 +3474,9 @@ export class Polygon extends BaseClass { * Return the polygon stroke width */ @CordovaInstance({ sync: true }) - getStrokeWidth(): number { return; } + getStrokeWidth(): number { + return; + } /** * When true, edges of the polygon are interpreted as geodesic and will follow the curvature of the Earth. @@ -3195,15 +3490,15 @@ export class Polygon extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getGeodesic(): boolean { return; } - + getGeodesic(): boolean { + return; + } } /** * @hidden */ export class Polyline extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -3217,13 +3512,17 @@ export class Polyline extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Change the polyline points. @@ -3253,7 +3552,9 @@ export class Polyline extends BaseClass { * Return true if the polyline is geodesic */ @CordovaInstance({ sync: true }) - getGeodesic(): boolean { return; } + getGeodesic(): boolean { + return; + } /** * Change visibility of the polyline @@ -3267,7 +3568,9 @@ export class Polyline extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } /** * Change clickablity of the polyline @@ -3281,7 +3584,9 @@ export class Polyline extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getClickable(): boolean { return; } + getClickable(): boolean { + return; + } /** * Change the polyline color @@ -3295,7 +3600,9 @@ export class Polyline extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getStrokeColor(): string { return; } + getStrokeColor(): string { + return; + } /** * Change the polyline stroke width @@ -3309,7 +3616,9 @@ export class Polyline extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getStrokeWidth(): number { return; } + getStrokeWidth(): number { + return; + } /** * Change the polyline zIndex order. @@ -3323,7 +3632,9 @@ export class Polyline extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Remove the polyline @@ -3340,7 +3651,6 @@ export class Polyline extends BaseClass { * @hidden */ export class TileOverlay extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -3354,13 +3664,17 @@ export class TileOverlay extends BaseClass { * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Set whether the tiles should fade in. @@ -3374,7 +3688,9 @@ export class TileOverlay extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getFadeIn(): boolean { return; } + getFadeIn(): boolean { + return; + } /** * Set the zIndex of the tile overlay @@ -3388,7 +3704,9 @@ export class TileOverlay extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getZIndex(): number { return; } + getZIndex(): number { + return; + } /** * Set the opacity of the tile overlay @@ -3402,7 +3720,9 @@ export class TileOverlay extends BaseClass { * @return {number} */ @CordovaInstance({ sync: true }) - getOpacity(): number { return; } + getOpacity(): number { + return; + } /** * Set false if you want to hide @@ -3416,13 +3736,17 @@ export class TileOverlay extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } /** * Get tile size */ @CordovaInstance({ sync: true }) - getTileSize(): any { return; } + getTileSize(): any { + return; + } /** * Remove the tile overlay @@ -3439,7 +3763,6 @@ export class TileOverlay extends BaseClass { * @hidden */ export class KmlOverlay extends BaseClass { - private _map: GoogleMap; constructor(_map: GoogleMap, _objectInstance: any) { @@ -3448,12 +3771,12 @@ export class KmlOverlay extends BaseClass { this._objectInstance = _objectInstance; Object.defineProperty(self, 'camera', { - value: this._objectInstance.camera, - writable: false + value: this._objectInstance.camera, + writable: false }); Object.defineProperty(self, 'kmlData', { - value: this._objectInstance.kmlData, - writable: false + value: this._objectInstance.kmlData, + writable: false }); } @@ -3461,20 +3784,26 @@ export class KmlOverlay extends BaseClass { * Returns the viewport to contains all overlays */ @CordovaInstance({ sync: true }) - getDefaultViewport(): CameraPosition { return; } + getDefaultViewport(): CameraPosition { + return; + } /** * Return the ID of instance. * @return {string} */ @CordovaInstance({ sync: true }) - getId(): string { return; } + getId(): string { + return; + } /** * Return the map instance. * @return {GoogleMap} */ - getMap(): GoogleMap { return this._map; } + getMap(): GoogleMap { + return this._map; + } /** * Change visibility of the polyline @@ -3488,7 +3817,9 @@ export class KmlOverlay extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getVisible(): boolean { return; } + getVisible(): boolean { + return; + } /** * Change clickablity of the KmlOverlay @@ -3502,7 +3833,9 @@ export class KmlOverlay extends BaseClass { * @return {boolean} */ @CordovaInstance({ sync: true }) - getClickable(): boolean { return; } + getClickable(): boolean { + return; + } /** * Remove the KmlOverlay