2016-03-07 57 views
0

我想用我自己的边界框边界制作一个映射。但到目前为止,我每次都失败了。r中的ggmap - 自己的边界框

首先我试着用功能get_map来做。 Here我发现我需要指定source = "osm"。我的代码已经

my_map<-get_map(location=c(-15, 30, 15, 85), source="osm") 

,但我比我尝试使用get_openstreetmap收到错误

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(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对我来说是不够的。

Thx很多!

回答

0

几个问题在这里。你有一个拼写错误,包括get_openstreetmap函数在边界框中的缩放,导致错误。

get_openstreetmap(bbox = c(left = -15.00000, bottom = 29.38048, right = 15.00000, 
    top=85.00000), scale=606250) 

第二您要下载的规模似乎是为您的下载区域很小。尝试增加比例。

help(OSM_scale_lookup)