-
Notifications
You must be signed in to change notification settings - Fork 46
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
Set zoom level with a google_map object using the add_markers() #130
Comments
@nbarsch Set the See the difference between
|
Thanks for this! I got it to work. Did you guys just add this? Just as an FYI I tried this from the CRAN version (installed about a month or so ago) and kept running into unused argument: update_map_view. Figured it was added in the dev version so uninstalled and grabbed the dev version (install_github) and it worked fine. Not sure if I had an old CRAN version or not, looks like I probably did since the CRAN documentation is dated feb 1 (after I installed the CRAN version I had). Again, thanks for a pretty great package. |
@nbarsch My latest release to CRAN was version 2.4.0 last week, so yours was probably out of date. And yes, the Glad you're finding it useful. It's good to see people getting use out of it. And, if you come across any other suggestions feel free to ask! |
I need to be able to update where the map is centered without updating the zoom level of an already rendered map. Right now the only way that seems possible is by re-rending the map? Is there a way to center the map view around a new marker but keep the current zoom level? Also, similar to #230 |
I've just pushed an update to the master branch with a function e.g. google_map() %>%
add_markers(data = tram_stops, update_map_view = FALSE) %>%
google_map_view(location = c(52.5, 0.1), zoom = 6) I haven't fully decided on the function name or functionality yet, but let me know if this is what you're looking for. |
That's what I was looking for, thanks! |
I just tested this as follows, and it does not work:
|
@kaheil what specifically does not work? when you call the |
For me, the first marker (let's say a house in Massachusetts) I add, the map will zoom to it, then I clear markers, then I add a second marker (let's say a house in California), the map will not zoom to that house, but will be on a zoom and extent that shows the first marker and the second (even though the markers were cleared). The map seems to remember the markers even if they are cleared |
Moving to a new isssue #251 |
It states in the documentation "The map will automatically set the location and
zoom if markers are supplied through add_markers".
Is there a way to override the zoom level to a farther out zoom?
Reason behind this: I'd like to initially map just one coordinate, in shiny, but set the zoom level much farther out than the auto zoom to show the map around that one coordinate. I.e. ideally it would function as below (which in current syntax still gives me the close up on the one coordinate, from df gpscoords2 cols lat/lon).
The text was updated successfully, but these errors were encountered: