-
Notifications
You must be signed in to change notification settings - Fork 41
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
"dev mode" that displays map properties #238
Comments
Are you wanting this displayed in the javascript console? If you're in shiny mode you can observe the view changes using observeEvent({intput$myMap_view_change},{
## do something with input$myMap_view_change
}) |
And do you know where in the code this happens? |
the code for the mousecoordinates is here: https://github.com/r-spatial/leafem/blob/master/R/mousecoords.R#L53-L167 |
Thanks @tim-salabim - I now understand! |
@dcooley I am still planning to integrate mapdeck in mapview as a rendering platform. Maybe this is a good point to start the process... We can either expand the mousecoords above to work also on mapdeck objects or have something similar in mapdeck itself and I'll wrap it in the above. Also, it may be desirable to transfer the text based |
@tim-salabim I think Mile's suggestion of using the Still keen on supporting getting it working in |
Perfect, that'll make it easy for me to wrap it. To get mapdeck + mapview on the way, the most important function to expand is Hopefully I will find some time over the coming weeks to get this done. |
@MilesMcBain were you thinking this feature would only be used for developing & debugging? Here's a quick example which prints the current |
That was easier than anticipated! Right now
E.g. for points: Maybe there is some smart way of letting the user choose how to render different features given that mapdeck has multiple ways of rendering e.g. lines. The only requirement for This is a major step towards supporting mapdeck in mapview. What's left is automatic popup generation (in package leafpop) and a default map setup (in package mapview). |
Maybe you could use the same rules I apply for |
I'll look into those. |
That's the usecase yes, only used transiently, so appearance not that important. For context, I do a lot of embedding maps in HTML reports made with RMarkdown. So right now, once I have a edit: spurious words |
From a mapview point of view I'd be grateful if we could specify which of the information to query/display. E.g. current view bounds are not important as they presumably depend on the current window size. Hope this is not asking too much. |
@MilesMcBain If you want to try it out you can grab it from devtools::install_gihtub("SymbolixAU/mapdeck", ref = "issue238") @tim-salabim I'll take it into consideration, thanks. |
@MilesMcBain Does this |
Yes it does! Thank you very much 😄 |
Cool - I'll get it documented and into master |
Noting here - #211 (comment) - the impact to this issue should be minimal as the data is just printed to the map/screen. |
What do you want the feature to do?
Display me the current zoom level, pitch, aspect, and location of the
mapdeck
map.From digging around in the JS console, these are available at run time through a call like:
The idea is this would help the developer frame up the default views for dashboards, reports, etc.
Similar examples
mapview
displays the current cursor long lat and zoom.The text was updated successfully, but these errors were encountered: