Bug fix: remove the _gmaps_cdv_ class on map.remove() even there is another map is displayed
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.3.0-beta-20180327-1057" 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.3.0-beta-20180327-1145" 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
@@ -646,23 +646,24 @@ Map.prototype.remove = function(callback) {
value: true,
writable: false
});
- var div = self.get('div');
- if (div) {
- while (div) {
- if (div.style) {
- div.style.backgroundColor = '';
- }
- if (div.classList) {
- div.classList.remove('_gmaps_cdv_');
- } else if (div.className) {
- div.className = div.className.replace(/_gmaps_cdv_/g, "");
- div.className = div.className.replace(/\s+/g, " ");
- }
- div = div.parentNode;
- }
- }
- self.set('div', undefined);
+
self.trigger("remove");
+// var div = self.get('div');
+// if (div) {
+// while (div) {
+// if (div.style) {
+// div.style.backgroundColor = '';
+// }
+// if (div.classList) {
+// div.classList.remove('_gmaps_cdv_');
+// } else if (div.className) {
+// div.className = div.className.replace(/_gmaps_cdv_/g, "");
+// div.className = div.className.replace(/\s+/g, " ");
+// }
+// div = div.parentNode;
+// }
+// }
+// self.set('div', undefined);
// Close the active infoWindow

Bug fix: remove the _gmaps_cdv_ class on map.remove() even there is another map is displayed