1

I am trying to make a map with my own borders of bounding box. But so far I failed every time.

First I tried to do it with function get_map. Here I found that I need to specify source = "osm". My code had been

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

but I recieved an error

 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)'`

Than I tried using get_openstreetmap. My code was

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

but again I got an error

 Error: bounding box improperly specified.  see ?get_openstreetmap

Although I read both ?get_openstreetmap and ?get_map I dont know what I am doing wrong. Can anyone help me? Please consider that after getting a map I will need to add some points on it, so just url isn't enough for me.

Thx a lot!

Community
  • 1
  • 1
Bobesh
  • 1,157
  • 2
  • 15
  • 30

1 Answers1

-1

Couple of issues here. You have a typo thats including scale in your bounding box for the get_openstreetmap function, causing the error.

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

Second the scale you're trying to download appears to be to small for the region your downloading. Try increasing the scale.

help(OSM_scale_lookup)
user5219763
  • 1,284
  • 12
  • 19