(Android) Fix: Can not load icon image file for Marker after external link opened.
MODIFY
README.md
README.md
- Add: (Android/iOS/Browser) `TileOverlayOptions.getTile` can return **base64 encoded image(png,gif,jpeg)**.
+ - Fix: (Android) Can not load icon image file for Marker after external link opened.
+
- **v2.4.6**
- Fix: (iOS) Only `src/ios/check_sdk_version.js` error.

MODIFY
plugin.xml
plugin.xml
<?xml version='1.0' encoding='utf-8'?>
-<plugin id="cordova-plugin-googlemaps" version="2.5.0-beta-20180925-1830" 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.5.0-beta-20180927-1148" 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" />
<asset src="www/promise-7.0.4.min.js.map" target="promise-7.0.4.min.js.map" />

MODIFY
src/android/plugin/google/maps/AsyncLoadImage.java
src/android/plugin/google/maps/AsyncLoadImage.java
@@ -124,10 +124,8 @@ public class AsyncLoadImage extends AsyncTask<Void, Void, AsyncLoadImage.AsyncLo
mOptions.url = PluginUtil.getAbsolutePathFromCDVFilePath(resourceApi, mOptions.url);
}
- this.currentPageUrl = CordovaGoogleMaps.CURRENT_URL;
- if (this.currentPageUrl == null) {
this.currentPageUrl = webView.getUrl();
- }
+
//Log.d(TAG, "-->currentPageUrl = " + this.currentPageUrl);
//View browserView = webView.getView();

MODIFY
src/android/plugin/google/maps/CordovaGoogleMaps.java
src/android/plugin/google/maps/CordovaGoogleMaps.java
@@ -52,7 +52,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
public MyPluginLayout mPluginLayout = null;
public boolean initialized = false;
public PluginManager pluginManager;
- public static String CURRENT_URL;
private static final Object timerLock = new Object();
@SuppressLint("NewApi") @Override
@@ -73,7 +72,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
cordova.getActivity().runOnUiThread(new Runnable() {
@SuppressLint("NewApi")
public void run() {
- CURRENT_URL = webView.getUrl();
// Enable this, webView makes draw cache on the Android action bar issue.
//View view = webView.getView();
@@ -198,8 +196,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
alertDialog.show();
}
- CURRENT_URL = webView.getUrl();
-
//------------------------------
// Initialize Google Maps SDK
@@ -230,7 +226,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
}
});
*/
- CURRENT_URL = url;
return false;
}
@@ -383,7 +378,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
cordova.getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
- CURRENT_URL = webView.getUrl();
mPluginLayout.setBackgroundColor(Color.WHITE);
@@ -456,7 +450,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
pluginMap.initialize(cordova, webView);
pluginMap.mapCtrl = CordovaGoogleMaps.this;
pluginMap.self = pluginMap;
- pluginMap.CURRENT_PAGE_URL = CURRENT_URL;
PluginEntry pluginEntry = new PluginEntry(mapId, pluginMap);
pluginManager.addService(pluginEntry);
@@ -478,7 +471,6 @@ public class CordovaGoogleMaps extends CordovaPlugin implements ViewTreeObserver
pluginStreetView.initialize(cordova, webView);
pluginStreetView.mapCtrl = CordovaGoogleMaps.this;
pluginStreetView.self = pluginStreetView;
- pluginStreetView.CURRENT_PAGE_URL = CURRENT_URL;
PluginEntry pluginEntry = new PluginEntry(mapId, pluginStreetView);
pluginManager.addService(pluginEntry);

MODIFY
src/android/plugin/google/maps/MyPlugin.java
src/android/plugin/google/maps/MyPlugin.java
@@ -38,7 +38,6 @@ public class MyPlugin extends CordovaPlugin implements MyPluginInterface {
public PluginMap pluginMap = null;
protected boolean isRemoved = false;
protected static float density = Resources.getSystem().getDisplayMetrics().density;
- public String CURRENT_PAGE_URL;
public void setPluginMap(PluginMap pluginMap) {
this.pluginMap = pluginMap;

MODIFY
src/android/plugin/google/maps/PluginMap.java
src/android/plugin/google/maps/PluginMap.java
@@ -615,7 +615,6 @@ public class PluginMap extends MyPlugin implements OnMarkerClickListener,
((MyPluginInterface)plugin).setPluginMap(PluginMap.this);
MyPlugin myPlugin = (MyPlugin) plugin;
myPlugin.self = (MyPlugin)plugin;
- myPlugin.CURRENT_PAGE_URL = CURRENT_PAGE_URL;
myPlugin.create(args, callbackContext);
} catch (Exception e) {
e.printStackTrace();

(Android) Fix: Can not load icon image file for Marker after external link opened. #2438