bug fix: map.clear() throws error
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="cluster-20170819-1930" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
+<plugin id="cordova-plugin-googlemaps" version="cluster-20170822-1656" 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/Map.js
www/Map.js
@@ -250,14 +250,15 @@ Map.prototype.clear = function(callback) {
var clearObj = function(obj) {
var ids = Object.keys(obj);
- var id;
+ var id, instance;
for (var i = 0; i < ids.length; i++) {
id = ids[i];
- if (obj[id]) {
- if (obj[id].type === "MarkerCluster") {
- obj[id].remove();
+ instance = obj[id];
+ if (instance) {
+ if (instance.type === "MarkerCluster") {
+ instance.remove();
}
- obj[id].off();
+ instance.off();
delete obj[id];
}
}

bug fix: map.clear() throws error  #19