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


I am trying to load up a norway map using 'osm' within R,

myLocation <- c(lon = 17.468946, lat = 66.87202)
myMap <- get_map(location=myLocation,source="osm", color='bw')

I am getting error saying service unavailable-

Map from URL :,17.468946&zoom=10&size=640x640&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: HTTP status was '503 Service Unavailable'

Any ideas?

asked 13 Mar '15, 10:13

aborg88's gravatar image

accept rate: 0%

edited 13 Mar '15, 11:35

scai's gravatar image

scai ♦

I very much doubt that a maptype=terrain through the google map api would give you OSM data, or is this just an example of the area?

(13 Mar '15, 11:51) SK53 ♦

You don't say but this looks like the ggmap package ( which appears to use the Export function of the OSM API to provide a raster image . The latter hardly ever works because it is very resource intensive and it rarely gets cycles because of the standard load on tile servers.

Additionally if this ever became heavily used it might be seen as a tile scraping application (see the get_cloudmade and get_stamen function documentation) which is contarary to OSM's Terms of Service.

In summary this is probably not working because it is using part of the OSM API which rarely functions for performance/load balancing reasons.

For vector data in R, the osmar package is probably the best choice.

permanent link

answered 13 Mar '15, 11:55

SK53's gravatar image

SK53 ♦
accept rate: 22%

ggmap package seems buggy. Why ask to google API for retrieving osm tiles? Maybe you may try the package 'OpenStreetMap': I've tested it, and it works fine.

permanent link

answered 13 Mar '15, 11:47

NicolasDumoulin's gravatar image

accept rate: 13%

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 13 Mar '15, 10:13

question was seen: 15,674 times

last updated: 13 Mar '15, 11:55

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