capacitor-community / capacitor-community/google-maps

Custom icon marker just wont work on IOS

Open
#240 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
161
Forks
65
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
I am trying to show a custom icon marker on the map, tried every possible way. the only way it worked and only on development env and not production, is if I run the capcitor server on https://192.168 and refer the icon url to there like https://192.168.x.x/assets/marker.png

I have tried to put absolutley every possible URL i could think of, eg.
/assets/marker.png
public/assets/marker.png
marker.png
www/assets/marker.png
capacitor://localhost/assets/marker.png
https://localhost/assets/marker.png

even with capacitor's Capacitor.convertFileSrc('')
and all with no luck.
get the same error in xCode - Error Domain=NSURLErrorDomain Code=-1002 "unsupported URL"

what is the correct and for sure working-in-production way of doing that on IOS?

**To Reproduce**
Steps to reproduce the behavior:
create a marker with icon.url refering to the file you need in the assets folder.

**Expected behavior**
the png shows instead of google's default pin

**Additional context**
im using the lastest plugin version with Capacitor 6

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.