From 4c548581d62183eb5238f44e8af998c228b0da84 Mon Sep 17 00:00:00 2001 From: Guille Date: Thu, 9 Jun 2016 11:50:59 +0200 Subject: [PATCH] Overwrite equals and toUrlValue --- src/plugins/googlemaps.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/plugins/googlemaps.ts b/src/plugins/googlemaps.ts index 5d0b8ed28..ad85609ef 100644 --- a/src/plugins/googlemaps.ts +++ b/src/plugins/googlemaps.ts @@ -998,11 +998,8 @@ export class GoogleMapsLatLng { this._objectInstance = new plugin.google.maps.LatLng(lat, lng); } - @CordovaInstance({ - sync: true - }) equals(other: GoogleMapsLatLng): boolean { - return; + return this.lat === other.lat && this.lng === other.lng; } @CordovaInstance({ @@ -1012,10 +1009,9 @@ export class GoogleMapsLatLng { return; } - @CordovaInstance({ - sync: true - }) toUrlValue(precision?: number): string { - return; + precision = precision || 6; + + return this.lat.toFixed(precision) + ',' + this.lng.toFixed(precision); } }