Skip to content

Commit

Permalink
Fixed same usage pattern in other areas of the plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ebhsgit committed May 21, 2021
1 parent 918eb5a commit 0b8ea76
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
8 changes: 3 additions & 5 deletions src/android/plugin/google/maps/CordovaGoogleMaps.java
Original file line number Diff line number Diff line change
Expand Up @@ -468,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 0b8ea76

Please sign in to comment.