[英]ggmap in r - own bounding box
我正在尝试使用我自己的边界框边界制作地图。 但到目前为止,我每次都失败了。
首先,我尝试使用函数get_map
来完成它。 在这里我发现我需要指定source = "osm"
。 我的代码已经
my_map<-get_map(location=c(-15, 30, 15, 85), source="osm")
但我收到一个错误
Error: map grabbing failed - see details in ?get_openstreetmap.
In addition: Warning message:
In download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") :
cannot open: HTTP status was '0 (nil)'`
比我尝试使用get_openstreetmap
。 我的代码是
get_openstreetmap(bbox = c(left = -15.00000, bottom = 29.38048, right = 15.00000,
top=85.00000, scale=606250))
但我又犯了一个错误
Error: bounding box improperly specified. see ?get_openstreetmap
虽然我读了?get_openstreetmap
和?get_map
我不知道我做错了什么。 谁能帮我? 请考虑在获得地图后我需要在其上添加一些points
,因此仅url
对我来说是不够的。
多谢!
这里有几个问题。 您有一个错字,包括get_openstreetmap
函数的边界框中的get_openstreetmap
,导致错误。
get_openstreetmap(bbox = c(left = -15.00000, bottom = 29.38048, right = 15.00000,
top=85.00000), scale=606250)
其次,您尝试下载的规模对于您下载的区域来说似乎很小。 尝试增加规模。
help(OSM_scale_lookup)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.