Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
当我使用 ggmap 进行地理编码时:
library(ggmap) map_obj <- get_map("Anchorage, AK")
我如何找到它的经纬度范围?我可以做一个 str(map_obj) 并看到 $ll.lat, $ll.lon ...但是我怎样才能得到这些?我试过 map_obj$ll.lon
我问这个问题是因为我想将我的数据点子集化到地图的可见区域,而不是将整个纬度和经度向量扔到 ggmap。
要获取所有边界框数据:
attr(map_obj, "bb")
要获取特定坐标:
attr(map_obj, "bb")$ll.lat
(等等)