2016-04-29 23:56:49 -04:00
|
|
|
import {Cordova, Plugin} from './plugin';
|
2016-05-20 16:59:18 -04:00
|
|
|
import {Observable} from 'rxjs/Rx';
|
2016-04-29 23:56:49 -04:00
|
|
|
import {CordovaInstance} from './plugin';
|
2016-03-29 06:50:03 -04:00
|
|
|
/**
|
|
|
|
* Created by Ibrahim on 3/29/2016.
|
|
|
|
*/
|
2016-04-29 23:56:49 -04:00
|
|
|
declare var plugin: any;
|
2016-03-29 06:50:03 -04:00
|
|
|
/**
|
|
|
|
* @name Google Maps
|
|
|
|
*/
|
|
|
|
@Plugin({
|
2016-04-29 22:47:45 -04:00
|
|
|
pluginRef: 'plugin.google.maps',
|
|
|
|
plugin: 'cordova-plugin-googlemaps',
|
|
|
|
repo: 'https://github.com/mapsplugin/cordova-plugin-googlemaps'
|
2016-03-29 06:50:03 -04:00
|
|
|
})
|
|
|
|
export class GoogleMaps {
|
|
|
|
|
2016-04-29 23:56:49 -04:00
|
|
|
private _objectInstance: any;
|
2016-03-29 06:50:03 -04:00
|
|
|
|
2016-04-29 23:56:49 -04:00
|
|
|
constructor (elementId: string) {
|
2016-04-29 22:47:01 -04:00
|
|
|
this._objectInstance = plugin.google.maps.Map.getMap(document.getElementById(elementId));
|
2016-03-29 06:50:03 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@Cordova({
|
|
|
|
eventObservable: true,
|
|
|
|
event: 'plugin.google.maps.event.MAP_READY'
|
|
|
|
})
|
2016-04-29 23:56:49 -04:00
|
|
|
static onInit (): Observable<GoogleMaps> {return; }
|
2016-03-29 06:50:03 -04:00
|
|
|
|
|
|
|
@CordovaInstance({
|
|
|
|
sync: true
|
|
|
|
})
|
2016-04-29 23:56:49 -04:00
|
|
|
setDebuggable (isDebuggable: boolean): void {}
|
2016-03-29 06:50:03 -04:00
|
|
|
|
2016-04-29 23:56:49 -04:00
|
|
|
setClickable (isClickable: boolean): void {}
|
2016-03-29 06:50:03 -04:00
|
|
|
|
2016-03-29 06:56:21 -04:00
|
|
|
}
|