From 918eb5a1bfce9595e922b3ad2442ff81cb9a0fa0 Mon Sep 17 00:00:00 2001 From: 8bhsolutions <48874658+8bhsolutions@users.noreply.github.com> Date: Fri, 21 May 2021 17:33:55 +1000 Subject: [PATCH] Fix blank map when starting app using cordova-android branch which has upgraded AGP to 4.1.3 --- src/android/plugin/google/maps/CordovaGoogleMaps.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/android/plugin/google/maps/CordovaGoogleMaps.java b/src/android/plugin/google/maps/CordovaGoogleMaps.java index 7e965dcee..a22702599 100644 --- a/src/android/plugin/google/maps/CordovaGoogleMaps.java +++ b/src/android/plugin/google/maps/CordovaGoogleMaps.java @@ -448,15 +448,13 @@ 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; + PluginMap pluginMap = new PluginMap(); PluginEntry pluginEntry = new PluginEntry(mapId, pluginMap); pluginManager.addService(pluginEntry); + pluginMap.mapCtrl = CordovaGoogleMaps.this; + pluginMap.self = pluginMap; pluginMap.getMap(args, callbackContext); }