NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

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's gravatar image

erikwanta
11223
accept rate: 0%

edited 04 Jun '16, 11:46

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554

You do not really ask about a google maps error here, right? ;-)

(04 Jun '16, 09:58) 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.

permanent link

answered 04 Jun '16, 10:32

aseerel4c26's gravatar image

aseerel4c26 ♦
32.6k18248554
accept rate: 18%

edited 04 Jun '16, 10:32

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.

permanent link

answered 04 Jun '16, 11:34

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×315
×293
×14
×10

question asked: 04 Jun '16, 08:40

question was seen: 8,719 times

last updated: 04 Jun '16, 11:46

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum