mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-21 17:36:27 +08:00
Merge pull request #188 from ZiFFeL1992/master
Some fixes on GoogleMaps plugin
This commit is contained in:
commit
01ae7ab3e6
@ -38,12 +38,12 @@ export const GoogleMapsAnimation = {
|
|||||||
* @description This plugin uses the native Google Maps SDK
|
* @description This plugin uses the native Google Maps SDK
|
||||||
* @usage
|
* @usage
|
||||||
* ```
|
* ```
|
||||||
* import {GoogleMaps, GoogleMapsEvent} from 'ionic-native';
|
* import {GoogleMap, GoogleMapsEvent} from 'ionic-native';
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
*
|
*
|
||||||
* // somewhere in your component
|
* // somewhere in your component
|
||||||
* let map = new GoogleMaps('elementID');
|
* let map = new GoogleMap('elementID');
|
||||||
*
|
*
|
||||||
* map.on(GoogleMapsEvent.MAP_READY).subscribe(() => console.log("Map is ready!"));
|
* map.on(GoogleMapsEvent.MAP_READY).subscribe(() => console.log("Map is ready!"));
|
||||||
* ```
|
* ```
|
||||||
@ -165,7 +165,7 @@ export class GoogleMap {
|
|||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
sync: true
|
sync: true
|
||||||
})
|
})
|
||||||
animateCamera(cameraPosition: CameraPosition): void {
|
animateCamera(animateCameraOptions: AnimateCameraOptions): void {
|
||||||
}
|
}
|
||||||
|
|
||||||
@CordovaInstance({
|
@CordovaInstance({
|
||||||
@ -352,26 +352,20 @@ export class GoogleMap {
|
|||||||
|
|
||||||
}
|
}
|
||||||
export interface AnimateCameraOptions {
|
export interface AnimateCameraOptions {
|
||||||
target?: string;
|
target?: GoogleMapsLatLng;
|
||||||
tilt?: number;
|
tilt?: number;
|
||||||
zoom?: number;
|
zoom?: number;
|
||||||
bearing?: number;
|
bearing?: number;
|
||||||
duration?: number;
|
duration?: number;
|
||||||
}
|
}
|
||||||
export interface CameraPosition {
|
export interface CameraPosition {
|
||||||
target?: {
|
target?: GoogleMapsLatLng;
|
||||||
lat?: string;
|
|
||||||
lng?: string;
|
|
||||||
};
|
|
||||||
zoom?: number;
|
zoom?: number;
|
||||||
tilt?: number;
|
tilt?: number;
|
||||||
bearing?: number;
|
bearing?: number;
|
||||||
}
|
}
|
||||||
export interface MyLocation {
|
export interface MyLocation {
|
||||||
latLng?: {
|
latLng?: GoogleMapsLatLng;
|
||||||
lat?: string;
|
|
||||||
lng?: string;
|
|
||||||
};
|
|
||||||
speed?: number;
|
speed?: number;
|
||||||
time?: string;
|
time?: string;
|
||||||
bearing?: number;
|
bearing?: number;
|
||||||
@ -989,7 +983,7 @@ export class GoogleMapsKmlOverlay {
|
|||||||
export class GoogleMapsLatLng {
|
export class GoogleMapsLatLng {
|
||||||
private _objectInstance: any;
|
private _objectInstance: any;
|
||||||
|
|
||||||
constructor(public lat: string, public lng: string) {
|
constructor(public lat: number, public lng: number) {
|
||||||
this._objectInstance = new plugin.google.maps.LatLng(lat, lng);
|
this._objectInstance = new plugin.google.maps.LatLng(lat, lng);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user