If developer sets {x, y} to marker.anchor, convert to [x, y] internally
MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.6.3-20190808-1420" 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.6.3-20190808-1509" 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" />
<js-module name="BaseClass" src="www/BaseClass.js">

MODIFY
www/Map.js
www/Map.js
@@ -1331,6 +1331,11 @@ Map.prototype.addMarker = function(markerOptions, callback) {
marker = undefined;
});
+ if (typeof markerOptions.anchor === 'object' &&
+ 'x' in markerOptions.anchor && 'y' in markerOptions.anchor) {
+ markerOptions.anchor = [markerOptions.anchor.x, markerOptions.anchor.y];
+ }
+
self.exec.call(self, function(result) {
markerOptions.icon.size = markerOptions.icon.size || {};

MODIFY
www/Marker.js
www/Marker.js
@@ -56,6 +56,13 @@ var Marker = function(map, markerOptions, _exec, extras) {
});
self.on('icon_changed', function() {
var icon = self.get('icon');
+
+ if (typeof icon === "object" &&
+ typeof icon.anchor === 'object' &&
+ 'x' in icon.anchor &&
+ 'y' in icon.anchor) {
+ icon.anchor = [icon.anchor.x, icon.anchor.y];
+ }
self.exec.call(self, null, self.errorHandler, self.getPluginName(), 'setIcon', [self.getId(), icon]);
});
self.on('flat_changed', function() {

If developer sets {x, y} to marker.anchor, convert to [x, y] internally
https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/2613