From b46602f136c72083a8c0b97efe93363c4940f2ee Mon Sep 17 00:00:00 2001 From: yjseo29 Date: Thu, 26 Oct 2023 17:24:46 +0900 Subject: [PATCH] FIX - mapsplugin#2886 - Custom marker not showing when using Cordova-android 10+ --- src/android/plugin/google/maps/AsyncLoadImage.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/android/plugin/google/maps/AsyncLoadImage.java b/src/android/plugin/google/maps/AsyncLoadImage.java index 16e0bb04b..1c27ac369 100644 --- a/src/android/plugin/google/maps/AsyncLoadImage.java +++ b/src/android/plugin/google/maps/AsyncLoadImage.java @@ -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);