update: prevent JS error on trigger() method
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.5.0-beta-20181003-0957" 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.5.0-beta-20181003-1130" 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="Promise" src="www/Promise.js" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />

MODIFY
src/browser/PluginMap.js
src/browser/PluginMap.js
@@ -57,6 +57,9 @@ function PluginMap(mapId, options, mapDivId) {
container.style.left = 0;
mapDiv.insertBefore(container, mapDiv.firstElementChild);
+ self._cmdQueue.onThrottled('insert_at', function() {
+ console.log(`self._cmdQueue.getLength() = ${self._cmdQueue.getLength()}`);
+ }, 1000);
self.set("isGoogleReady", false);
self.set("container", container);

MODIFY
www/BaseClass.js
www/BaseClass.js
+
var VARS_FIELD = typeof Symbol === 'undefined' ? '__vars' + Date.now() : Symbol('vars');
var SUBSCRIPTIONS_FIELD = typeof Symbol === 'undefined' ? '__subs' + Date.now() : Symbol('subscriptions');
@@ -65,6 +66,9 @@ BaseClass.prototype = {
var self = this;
keys.forEach(function(_hashCode) {
+ if (self[SUBSCRIPTIONS_FIELD] &&
+ self[SUBSCRIPTIONS_FIELD][eventName] &&
+ _hashCode in self[SUBSCRIPTIONS_FIELD][eventName]) {
var info = self[SUBSCRIPTIONS_FIELD][eventName][_hashCode];
switch (info.kind) {
@@ -72,15 +76,16 @@ BaseClass.prototype = {
info.listener.apply(self, args);
break;
case 'onThrottled':
- self[SUBSCRIPTIONS_FIELD][eventName][_hashCode].args = args;
- if (!self[SUBSCRIPTIONS_FIELD][eventName][_hashCode].timer) {
- self[SUBSCRIPTIONS_FIELD][eventName][_hashCode].timer = setTimeout(function() {
+ info.args = args;
+ if (!info.timer) {
+ info.timer = setTimeout(function() {
info.listener.apply(this, info.args);
info.timer = null;
}.bind(self), info.interval);
}
break;
}
+ }
});
return this;

update: prevent JS error on trigger() method