Reputation: 19
I uploaded a png icon to my webspace, which is accessible with this url: https://hlsdb.de/icon/test.png
I now want to embed this icon in a static mapbox map. According the API docu, the following url should work:
But i got the following response:
{"message":"Custom image not found"}
What is wrong?
Upvotes: 0
Views: 731
Reputation: 1774
It's hard to say what's wrong without knowing more about how you've configured the site you are trying to retrieve the marker icon from. How your .png is hosted certainly seems to be the issue.
When I replace your encoded uri with a different one, but keep the rest of the request intact, I get the expected results:
query
https://api.mapbox.com/styles/v1/mapbox/light-v9/static/url-https%3A%2F%2Femojipedia-us.s3.dualstack.us-west-1.amazonaws.com%2Fthumbs%2F320%2Fapple%2F198%2Fthinking-face_1f914.png(8.400038,49.99284)/8.400038,49.99284,16,0,0/1200x514@2x?access_token=XXX
Do you have any robots.txt
or other domain restrictions that might prevent the Mapbox service from retrieving the image? That's where I'd look first.
⚠️ disclaimer: I currently work at Mapbox ⚠️
Upvotes: 1