Skip to content

Commit

Permalink
Merge pull request #1 from Skandnet/pr-fix_2871-AGP_4_1_x_blank_screen
Browse files Browse the repository at this point in the history
Pr fix 2871 agp 4 1 x blank screen
  • Loading branch information
chargePanelAndreas authored Oct 28, 2021
2 parents a92f98f + 0b8ea76 commit b322f19
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 15 deletions.
16 changes: 6 additions & 10 deletions src/android/plugin/google/maps/CordovaGoogleMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -470,14 +468,12 @@ 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;

PluginEntry pluginEntry = new PluginEntry(mapId, pluginStreetView);
pluginManager.addService(pluginEntry);

pluginStreetView.mapCtrl = CordovaGoogleMaps.this;
pluginStreetView.self = pluginStreetView;

pluginStreetView.getPanorama(args, callbackContext);
}

Expand Down
5 changes: 0 additions & 5 deletions src/android/plugin/google/maps/PluginMap.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,9 +613,6 @@ 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);
((MyPluginInterface)plugin).setPluginMap(PluginMap.this);
MyPlugin myPlugin = (MyPlugin) plugin;
myPlugin.self = (MyPlugin)plugin;
Expand Down Expand Up @@ -666,8 +663,6 @@ 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);
((MyPluginInterface)plugin).setPluginMap(PluginMap.this);
pluginEntry.plugin.execute("create", args, callbackContext);

Expand Down

0 comments on commit b322f19

Please sign in to comment.