stamen / chartographer

https://stamen.github.io/chartographer/
MIT License
19 stars 4 forks source link

Add style URL to the hash #62

Closed aparlato closed 1 year ago

aparlato commented 1 year ago

Closes #48

If you add a style via url, that style will be added to the hash. Then on refresh, the style will be fetched again. If you add a new style via drag and drop, the url will be removed from the hash.

aparlato commented 1 year ago

@ebrelsford good catch! Just updated.

[edit]: Found another issue to resolve first

aparlato commented 1 year ago

Ok, now I think this should be good to go.

aparlato commented 1 year ago

I'm not sure if that was introduced here, if it wasn't let's open a follow-up issue for it.

Yea, that one's a bit deeper of an issue, but an intentional choice. We decided to always flip back to the fill page to replenish the background layer: https://github.com/stamen/chartographer/blob/fe8a56a7e2b994ed0da7e39416dc13433fa9de0d/src/App.svelte#L125-L126

This carries over to styles in the URL since they're treated as a new style and need a background layer.

[edit]: Opened issue here: https://github.com/stamen/chartographer/issues/63