Bug fix: `self is undefined` in LatLng class
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta3-20170828-2350" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="2.0.0-beta3-20170829-1218" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
<name>cordova-plugin-googlemaps</name>
<js-module name="BaseClass" src="www/BaseClass.js">
<runs />

MODIFY
www/LatLng.js
www/LatLng.js
@@ -25,8 +25,8 @@ LatLng.prototype = {
*/
equals: function(other) {
other = other || {};
- return other.lat === self.lat &&
- other.lng === self.lng;
+ return other.lat === this.lat &&
+ other.lng === this.lng;
},
/**
@@ -34,7 +34,7 @@ LatLng.prototype = {
* @return {String} latitude,lontitude
*/
toString: function() {
- return '{"lat": ' + self.lat + ', "lng": ' + self.lng + '}';
+ return '{"lat": ' + this.lat + ', "lng": ' + this.lng + '}';
},
/**
@@ -44,7 +44,7 @@ LatLng.prototype = {
*/
toUrlValue: function(precision) {
precision = precision || 6;
- return '{"lat": ' + self.lat.toFixed(precision) + ', "lng": ' + self.lng.toFixed(precision) + '}';
+ return '{"lat": ' + this.lat.toFixed(precision) + ', "lng": ' + this.lng.toFixed(precision) + '}';
}
};

Bug fix: `self is undefined` in LatLng class