I am trying to use R to download a map but am getting a map grabbing failed message: mapImage <- get_map(location = c(lon = -87.89, lat = 43.05),color = "color",source = "osm",zoom = 6) Map from URL : http://maps.googleapis.com/maps/api/staticmap?center=43.05,-87.89&zoom=6&size=640x640&scale=2&maptype=terrain&sensor=false 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 URL 'http://tile.openstreetmap.org/cgi-bin/export?bbox=-94.910263671875,37.6894455061226,-80.847763671875,47.9652621160178&scale=10000000&format=png': HTTP status was '0 (null)' asked 04 Jun '16, 08:40 erikwanta aseerel4c26 ♦ |
Likely the image area is too big or the server currently has too high load to process your special request. Also see https://help.openstreetmap.org/questions/21192/error-export-load-average-on-the-server-is-too-high-at-the-moment . Use tiles instead - they are usually pre-rendered and served via a CDN. Or use a different service (e.g. MapQuest Open Static Maps, see OSM on paper) which is based on OpenStreetMap data. answered 04 Jun '16, 10:32 aseerel4c26 ♦ |
See this previous question among others re R. The options at aseerel4c26's "OSM on paper" link are the way to go, if you want a rendered map (as opposed to the map data itself). Would it be possible to find out whose code it is (in whatever library or example) that contains the offending "http://tile.openstreetmap.org/cgi-bin/export?bbox=" request? I'd be happy to explain why what they are suggesting will almost never work. answered 04 Jun '16, 11:34 SomeoneElse ♦ |
You do not really ask about a google maps error here, right? ;-)