Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image url in markers #1760

Closed
pixnlove opened this issue Nov 25, 2015 · 4 comments
Closed

Image url in markers #1760

pixnlove opened this issue Nov 25, 2015 · 4 comments

Comments

@pixnlove
Copy link

I have some images hosted on AWS that I would like to display them on the map like markers (a popup is assigned on each).

issuemapbox

They are loaded dynamically from my server, what is the best approach to integrate these images like the example?

Thanks for your help ;)

@jfirebaugh
Copy link
Contributor

It's not yet possible to load marker images from an external source; they must be included in the style sprite. See #358 for the feature request.

@buchanae
Copy link
Contributor

Isn't this possible via Image sources?

e.g. https://www.mapbox.com/mapbox-gl-js/example/image-on-a-map/

@pixnlove
Copy link
Author

Images sources don't behave as markers: when you're scrolling on the map they don't keep their size. The only solution that I found for the moment is to add a popup element for each image marker but it's not very clean.
It will be awesome to have the ability to add an extra HTML param on a feature source 😍

@pixnlove
Copy link
Author

Maybe a solution to implement in the Mapbox GL library : https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Drawing_DOM_objects_into_a_canvas ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants