Skip to content

add info about map center input event to doc #450

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions shiny.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ The map itself also has a few input values/events.

<code>input$*MAPID*\_zoom</code> is an integer that indicates the [zoom level](http://wiki.openstreetmap.org/wiki/Zoom_levels).

<code>input$*MAPID*\_center</code> provides the latitude/longtitude of the center of the currently visible map area; the value is a `list()` that has named elements `lat` and `lng`.

### Putting it all together

For an extensive example of Shiny and Leaflet working together, take a look at the [SuperZip Explorer](http://shiny.rstudio.com/gallery/superzip-example.html) example app (note the "Get Code" button at the top of the page). (Hint: Try clicking on the bubbles, and also notice that the plots in the sidebar change as you pan and zoom around the map.)
Expand Down