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

Displaying marker icons from other styles disappears #1930

Closed
roblav96 opened this issue Jan 14, 2016 · 9 comments
Closed

Displaying marker icons from other styles disappears #1930

roblav96 opened this issue Jan 14, 2016 · 9 comments

Comments

@roblav96
Copy link

I'd like to have a feature where the user can change the map style as they please.

Following this exact example:
https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/
But changing the style, the markers disappear.

Maybe is it possible to import the Maki icons for all styles?
https://github.com/mapbox/maki

I'm trying to see how I can read the sprites being used in the streets-v8.json style and import them globally to the map somehow?

@nicooprat
Copy link

+1 I'd like that behavior too. Changing styles should not "empty" existing layers. I'm not using Maki icons but only drawing shapes, but they also disappear.

@soffes
Copy link

soffes commented Feb 16, 2016

+1 I spent awhile trying to figure this out but didn't get anywhere.

@lucaswoj
Copy link
Contributor

duplicate of mapbox/mapbox-gl-styles#241

@nicooprat
Copy link

Sorry but I'm not sure if I misunderstood something or if I should create another issue? I'm not using any icons, I'm only drawing (lines and circles) on my map, and when I change its style, all shapes disappears and I have to reload my datas. Here's a video of my issue (not my website but was easier to show): http://streamable.com/3i0w

@roblav96
Copy link
Author

@nicooprat This is a separate issue.

What I've done is stored all my popups and layer data separately then reload the data when I change styles.

@nicooprat
Copy link

Yes of course but I think it's not the supposed behavior. I will open another issue, thanks.

@agusterodin
Copy link

Did anybody ever find a solution?

@asheemmamoowala
Copy link
Contributor

I'm not using any icons, I'm only drawing (lines and circles) on my map, and when I change its style, all shapes disappears and I have to reload my datas.

This is a duplicate of of #4225.

@Aamir2000
Copy link

+1 annoying super annoying for sure it should save its state automatically and handle styles, layers and other things that has anything to do with changing map in any way internally. It'll help abstract away some of that complexity of having to deal with map state and all. While using mapbox-directions it kinda make it disappear from map when styles and layers are updated.

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

8 participants