From f424a133c9da61f703c4a51f291fc362ecd4af25 Mon Sep 17 00:00:00 2001 From: HenleyCoder <34779181+HenleyCoder@users.noreply.github.com> Date: Mon, 20 Jul 2020 13:11:38 +0100 Subject: [PATCH 1/6] Update PluginMarkerCluster.js When adding a marker, the onerror function should not be calling getMessage() as I believe this is a Java function call. Ideally the message written to the console should include some way to identify the marker that generated the error such as the path or url or Id. --- src/browser/PluginMarkerCluster.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/PluginMarkerCluster.js b/src/browser/PluginMarkerCluster.js index 68d1e430d..6a5eda2ae 100644 --- a/src/browser/PluginMarkerCluster.js +++ b/src/browser/PluginMarkerCluster.js @@ -353,7 +353,7 @@ PluginMarkerCluster.prototype.redrawClusters = function(onSuccess, onError, args } self.pluginMarkers[clusterId_markerId] = STATUS.DELETED; - console.warn(error.getMessage()); + console.warn(`Error loading marker`); self.deleteMarkers.push(clusterId_markerId); resolve(); }); From 1e4f00dc52c8a49bd8df242da0cbfe5c4781aee3 Mon Sep 17 00:00:00 2001 From: HenleyCoder <34779181+HenleyCoder@users.noreply.github.com> Date: Mon, 20 Jul 2020 13:13:42 +0100 Subject: [PATCH 2/6] Update PluginMarker.js When adding a marker, the onerror function should not be calling getMessage() as I believe this is a Java function call. Ideally the message written to the console should include some way to identify the marker that generated the error such as the path or url or Id. --- src/browser/PluginMarker.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/browser/PluginMarker.js b/src/browser/PluginMarker.js index cc7d3d60c..2d6a20d24 100644 --- a/src/browser/PluginMarker.js +++ b/src/browser/PluginMarker.js @@ -150,7 +150,7 @@ PluginMarker.prototype.__create = function(markerId, pluginOptions, onSuccess, o }); }; img.onerror = function(error) { - console.warn(error.getMessage()); + console.warn(`Error loading marker`); onSuccess(marker, { '__pgmId': markerId, 'width': 20, From 623ff64340effcfd583ed9c063f07a4a485869e7 Mon Sep 17 00:00:00 2001 From: HenleyCoder <34779181+HenleyCoder@users.noreply.github.com> Date: Fri, 29 Oct 2021 21:12:39 +0100 Subject: [PATCH 3/6] Update CordovaGoogleMaps.java --- .../plugin/google/maps/CordovaGoogleMaps.java | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/android/plugin/google/maps/CordovaGoogleMaps.java b/src/android/plugin/google/maps/CordovaGoogleMaps.java index 3b97a6f2d..f7970df55 100644 --- a/src/android/plugin/google/maps/CordovaGoogleMaps.java +++ b/src/android/plugin/google/maps/CordovaGoogleMaps.java @@ -470,14 +470,22 @@ public void getPanorama(final JSONArray args, final CallbackContext callbackCont String mapId = meta.getString("__pgmId"); Log.d(TAG, "---> mapId = " + mapId); PluginStreetViewPanorama pluginStreetView = new PluginStreetViewPanorama(); - pluginStreetView.privateInitialize(mapId, cordova, webView, null); - pluginStreetView.initialize(cordova, webView); - pluginStreetView.mapCtrl = CordovaGoogleMaps.this; - pluginStreetView.self = pluginStreetView; + + + //ATW removed these 2 lines to make app work with cordova 10 as per issue 2872 + //pluginStreetView.privateInitialize(mapId, cordova, webView, null); + //pluginStreetView.initialize(cordova, webView); + PluginEntry pluginEntry = new PluginEntry(mapId, pluginStreetView); pluginManager.addService(pluginEntry); + //ATW moved these 2 lines from above the two above to make app work with cordova 10 as per issue 2872 + pluginStreetView.mapCtrl = CordovaGoogleMaps.this; + pluginStreetView.self = pluginStreetView; + + + pluginStreetView.getPanorama(args, callbackContext); } From d510d1024465473d9e4e75334dd7a26ee7f92df1 Mon Sep 17 00:00:00 2001 From: HenleyCoder <34779181+HenleyCoder@users.noreply.github.com> Date: Fri, 29 Oct 2021 21:18:33 +0100 Subject: [PATCH 4/6] Update PluginMap.java --- src/android/plugin/google/maps/PluginMap.java | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/android/plugin/google/maps/PluginMap.java b/src/android/plugin/google/maps/PluginMap.java index 0ea45af0f..3d0818931 100644 --- a/src/android/plugin/google/maps/PluginMap.java +++ b/src/android/plugin/google/maps/PluginMap.java @@ -631,9 +631,11 @@ public synchronized void loadPlugin(final JSONArray args, final CallbackContext plugins.put(pluginName, pluginEntry); mapCtrl.pluginManager.addService(pluginEntry); - plugin.privateInitialize(pluginName, cordova, webView, null); - - plugin.initialize(cordova, webView); + //ATW removed these 2 lines to make app work with cordova 10 as per issue 2872 + //plugin.privateInitialize(pluginName, cordova, webView, null); + //plugin.initialize(cordova, webView); + + ((MyPluginInterface)plugin).setPluginMap(PluginMap.this); MyPlugin myPlugin = (MyPlugin) plugin; myPlugin.self = (MyPlugin)plugin; @@ -684,8 +686,11 @@ public void create(final JSONArray args, final CallbackContext callbackContext) pluginMap = PluginMap.this; pluginMap.mapCtrl.pluginManager.addService(pluginEntry); - plugin.privateInitialize(className, cordova, webView, null); - plugin.initialize(cordova, webView); + //ATW removed these 2 lines to make app work with cordova 10 as per issue 2872 + //plugin.privateInitialize(className, cordova, webView, null); + //plugin.initialize(cordova, webView); + + ((MyPluginInterface)plugin).setPluginMap(PluginMap.this); pluginEntry.plugin.execute("create", args, callbackContext); From 3b7e18977da7b16fefdfdf4fb560021d010553b4 Mon Sep 17 00:00:00 2001 From: RowTracker Date: Fri, 5 Nov 2021 14:17:24 +0000 Subject: [PATCH 5/6] Remvoved uses-feature android gps as it clashes with location plugin --- plugin.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin.xml b/plugin.xml index 7c9add1a4..aa8f519e0 100644 --- a/plugin.xml +++ b/plugin.xml @@ -266,7 +266,8 @@ - + From eebd9fdfb6af9abb95137d8647a54cade518cf78 Mon Sep 17 00:00:00 2001 From: RowTracker Date: Thu, 11 Nov 2021 21:13:41 +0000 Subject: [PATCH 6/6] change to stop Gradle 6 assert error --- .../plugin/google/maps/CordovaGoogleMaps.java | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/android/plugin/google/maps/CordovaGoogleMaps.java b/src/android/plugin/google/maps/CordovaGoogleMaps.java index f7970df55..fe92eefe4 100644 --- a/src/android/plugin/google/maps/CordovaGoogleMaps.java +++ b/src/android/plugin/google/maps/CordovaGoogleMaps.java @@ -449,14 +449,18 @@ public void getMap(final JSONArray args, final CallbackContext callbackContext) JSONObject meta = args.getJSONObject(0); String mapId = meta.getString("__pgmId"); PluginMap pluginMap = new PluginMap(); - pluginMap.privateInitialize(mapId, cordova, webView, null); - pluginMap.initialize(cordova, webView); - pluginMap.mapCtrl = CordovaGoogleMaps.this; - pluginMap.self = pluginMap; + + //ATW removed these 2 lines to make app work with cordova 10 as per issue 2872 + //pluginMap.privateInitialize(mapId, cordova, webView, null); + //pluginMap.initialize(cordova, webView); + //pluginMap.mapCtrl = CordovaGoogleMaps.this; + //pluginMap.self = pluginMap; PluginEntry pluginEntry = new PluginEntry(mapId, pluginMap); pluginManager.addService(pluginEntry); + pluginMap.mapCtrl = CordovaGoogleMaps.this; + pluginMap.self = pluginMap; pluginMap.getMap(args, callbackContext); } @@ -470,8 +474,7 @@ public void getPanorama(final JSONArray args, final CallbackContext callbackCont String mapId = meta.getString("__pgmId"); Log.d(TAG, "---> mapId = " + mapId); PluginStreetViewPanorama pluginStreetView = new PluginStreetViewPanorama(); - - + //ATW removed these 2 lines to make app work with cordova 10 as per issue 2872 //pluginStreetView.privateInitialize(mapId, cordova, webView, null); //pluginStreetView.initialize(cordova, webView);