Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/pr-fix_2886'
Browse files Browse the repository at this point in the history
  • Loading branch information
shajz committed Nov 2, 2021
2 parents 83ead9c + 514426a commit a72fb9e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 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,13 @@ 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 a72fb9e

Please sign in to comment.