Skip to content

Commit

Permalink
FIX - mapsplugin#2886 - Custom marker not showing when using Cordova-…
Browse files Browse the repository at this point in the history
…android 10+
  • Loading branch information
yjseo29 committed Oct 26, 2023
1 parent ede2ea8 commit b46602f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/android/plugin/google/maps/AsyncLoadImage.java
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,12 @@ protected AsyncLoadImageResult doInBackground(Void... params) {
if (!iconUrl.startsWith("data:image")) {

if (iconUrl.startsWith("http://localhost") ||
iconUrl.startsWith("http://127.0.0.1")) {
iconUrl.startsWith("https://localhost") ||
iconUrl.startsWith("http://127.0.0.1") ||
iconUrl.startsWith("https://127.0.0.1")) {
// Log.d(TAG, String.format("---->(201)iconURL = %s", iconUrl));
if (iconUrl.contains("://")) {
iconUrl = iconUrl.replaceAll("http://.+?/", "file:///android_asset/www/");
iconUrl = iconUrl.replaceAll("https?://.+?/", "file:///android_asset/www/");
} else {
// Avoid WebViewLocalServer (because can not make a connection for some reason)
iconUrl = "file:///android_asset/www/".concat(iconUrl);
Expand Down

0 comments on commit b46602f

Please sign in to comment.