SymbolixAU / mapdeck

R interface to Deck.gl and Mapbox
https://symbolixau.github.io/mapdeck/articles/mapdeck.html
363 stars 40 forks source link

Updateable 'url hashes' #324

Closed Robinlovelace closed 4 years ago

Robinlovelace commented 4 years ago

What do you want the feature to do?

Enable users of the mapdeck package to share a url zoomed into a specific place of interest.

Similar examples

http://spenser.geoplumber.com/?lat=53.813&lng=-1.506&zoom=13.72&bea=-3&pit=5.858695652173914&alt=1.5 in project led by Layik Hama.

Just an idea. We'll most likely go with a 'geoplumber' approach but wondering what shiny + mapdeck and possibly other R based solutions in this space can do...

dcooley commented 4 years ago

That's an interesting question. Do you have any idea how this would work through shiny?

Robinlovelace commented 4 years ago

Shiny's URL updating capabilities are surprisingly good. Here's an example with working 'save state' and bookmark observers. Looking at recent fixes in mapdeck I'm now sure that this could be done in this package which would be amazing.

Reproducible stand-alone example: https://github.com/saferactive/saferactive/blob/master/code/tests/shiny-bookmark-minimal.R

I'm closing because nothing needs to be done in your package as far as I'm aware, but documentation of a working example could be very useful to show it's possible so if you do get a minimal example please post here (and I suggest put in a unevaluated example somewhere in the docs, e.g. in the shiny section which could deserve being an article in its own right IMO).