简体   繁体   中英

get longitude/latitude from get_map() zoom level

In the code below, is it possible to get longitude/latitude values for a given zoom level of get_map()? At this time I can only read off the approximate values from the image of the map itself.

suppressMessages(library(ggmap))
ny.map <- get_map(location = geocode("New York"),
                  zoom = 15)
print(ggmap(ny.map))

在此输入图像描述 Thanks.

attr(ny.map, 'bb')
#     ll.lat    ll.lon   ur.lat    ur.lon
# 1 40.70235 -74.01968 40.72317 -73.99222

In which

  • ll = "lower left"
  • ur = "upper right"
  • lat = "latitude"
  • lon = "longitude"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM