Skip to content

Commit

Permalink
Merge pull request #2 from Skandnet/pr-fix_2886
Browse files Browse the repository at this point in the history
FIX - mapsplugin#2886 - Custom markers not working for cordova-android 10+
  • Loading branch information
chargePanelAndreas authored Oct 28, 2021
2 parents b322f19 + 514426a commit b07435e
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 b07435e

Please sign in to comment.