You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd like to allow the user to change the map type, switching between political (the default), aerial imagery, and a couple of other custom layers. I'm using SolidJS stores. This is what I have so far:
However when style() changes the map doesn't change. I think that's because it's lost reactivity, i.e. the value is read when the component is loaded but isn't read again.
Is there a way I could achieve this goal at the moment, or would the library need to be modified?
Cheers,
Cam
The text was updated successfully, but these errors were encountered:
Thanks for raising the first issue.
After I done some testing on changing map styles via signals and stores, I changed the MapGL component a bit.
Now it keeps all layers added via the Layer component when you change the map style.
Please update to the latest version.
In the Examples you can see how to change the map style via signals.
Thanks a lot for your library—it's really useful!
I'd like to allow the user to change the map type, switching between political (the default), aerial imagery, and a couple of other custom layers. I'm using SolidJS stores. This is what I have so far:
However when style() changes the map doesn't change. I think that's because it's lost reactivity, i.e. the value is read when the component is loaded but isn't read again.
Is there a way I could achieve this goal at the moment, or would the library need to be modified?
Cheers,
Cam
The text was updated successfully, but these errors were encountered: