mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-05-06 10:22:58 +08:00
fix(googlemaps): use correct methods for addGroundOverlay and addKmlOverlay (#268)
This commit is contained in:
parent
592feb409e
commit
b8be1de068
@ -238,7 +238,7 @@ export class GoogleMap {
|
|||||||
addGroundOverlay(options: GoogleMapsGroundOverlayOptions): Promise<GoogleMapsGroundOverlay> {
|
addGroundOverlay(options: GoogleMapsGroundOverlayOptions): Promise<GoogleMapsGroundOverlay> {
|
||||||
return new Promise<GoogleMapsGroundOverlay>(
|
return new Promise<GoogleMapsGroundOverlay>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addTileOverlay(options, (groundOverlay: any) => {
|
this._objectInstance.addGroundOverlay(options, (groundOverlay: any) => {
|
||||||
if (groundOverlay) resolve(new GoogleMapsGroundOverlay(groundOverlay));
|
if (groundOverlay) resolve(new GoogleMapsGroundOverlay(groundOverlay));
|
||||||
else reject();
|
else reject();
|
||||||
});
|
});
|
||||||
@ -249,7 +249,7 @@ export class GoogleMap {
|
|||||||
addKmlOverlay(options: GoogleMapsKmlOverlayOptions): Promise<GoogleMapsKmlOverlay> {
|
addKmlOverlay(options: GoogleMapsKmlOverlayOptions): Promise<GoogleMapsKmlOverlay> {
|
||||||
return new Promise<GoogleMapsKmlOverlay>(
|
return new Promise<GoogleMapsKmlOverlay>(
|
||||||
(resolve, reject) => {
|
(resolve, reject) => {
|
||||||
this._objectInstance.addTileOverlay(options, (kmlOverlay: any) => {
|
this._objectInstance.addKmlOverlay(options, (kmlOverlay: any) => {
|
||||||
if (kmlOverlay) resolve(new GoogleMapsKmlOverlay(kmlOverlay));
|
if (kmlOverlay) resolve(new GoogleMapsKmlOverlay(kmlOverlay));
|
||||||
else reject();
|
else reject();
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user