Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

osm and 404 Bad Request #161

Closed
topepo opened this issue Jun 6, 2017 · 1 comment
Closed

osm and 404 Bad Request #161

topepo opened this issue Jun 6, 2017 · 1 comment

Comments

@topepo
Copy link

topepo commented Jun 6, 2017

I'd like to get a map from California:

> sessionInfo()
R version 3.3.3 (2017-03-06)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS Sierra 10.12.4

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] ggmap_2.7       ggplot2_2.2.1   devtools_1.12.0

loaded via a namespace (and not attached):
 [1] Rcpp_0.12.11      magrittr_1.5      maps_3.1.1        munsell_0.4.3    
 [5] colorspace_1.3-2  geosphere_1.5-5   lattice_0.20-35   rjson_0.2.15     
 [9] R6_2.2.0          jpeg_0.1-8        rlang_0.1.1.9000  dplyr_0.5.0      
[13] stringr_1.2.0     httr_1.2.1        plyr_1.8.4        tools_3.3.3      
[17] grid_3.3.3        gtable_0.2.0      png_0.1-7         DBI_0.6-1        
[21] git2r_0.18.0      withr_1.0.2       assertthat_0.2.0  lazyeval_0.2.0   
[25] digest_0.6.12     tibble_1.3.3      reshape2_1.4.2    mapproj_1.2-4    
[29] bitops_1.0-6      curl_2.6          memoise_1.1.0     sp_1.2-4         
[33] stringi_1.1.5     RgoogleMaps_1.4.1 scales_0.4.1      proto_1.0.0      
> qmap(location = c(lon = -121.3603, lat = 38.59298),
+      source = "osm")
Source : https://maps.googleapis.com/maps/api/staticmap?center=38.59298,-121.3603&zoom=10&size=640x640&scale=2&maptype=terrain
Warning in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") :
  cannot open URL 'http://tile.openstreetmap.org/cgi-bin/export?bbox=-121.799066479492,38.2481446540177,-120.920160229492,38.9350987006879&scale=575000&format=png': HTTP status was '400 Bad Request'
Error: map grabbing failed - see details in ?get_openstreetmap.
> 
> qmap(location = "Sacramento California",
+      source = "osm")

Source : https://maps.googleapis.com/maps/api/staticmap?center=Sacramento+California&zoom=10&size=640x640&scale=2&maptype=terrain
Source : https://maps.googleapis.com/maps/api/geocode/json?address=Sacramento%20California
Warning in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") :
  cannot open URL 'http://tile.openstreetmap.org/cgi-bin/export?bbox=-121.933166079492,38.2366819712304,-121.054259829492,38.9237451619276&scale=575000&format=png': HTTP status was '400 Bad Request'
Error: map grabbing failed - see details in ?get_openstreetmap.
> 
> qmap(bbox = c(left  = -121.6341, bottom = 38.4899, 
+               right = -121.0597, top    = 38.7669),
+      source = "osm")
Source : https://maps.googleapis.com/maps/api/staticmap?center=houston&zoom=10&size=640x640&scale=2&maptype=terrain
Source : https://maps.googleapis.com/maps/api/geocode/json?address=houston
Warning in download.file(url, destfile = destfile, quiet = !messaging, mode = "wb") :
  cannot open URL 'http://tile.openstreetmap.org/cgi-bin/export?bbox=-95.8085692794922,29.3776110727761,-94.9296630294922,30.1405978019282&scale=575000&format=png': HTTP status was '400 Bad Request'
Error: map grabbing failed - see details in ?get_openstreetmap.
@dkahle
Copy link
Owner

dkahle commented Jun 7, 2017

Unfortunately, OpenStreetMap is no longer really an option in ggmap. See #117 for details, and if you construct a workaround to another service, please submit a PR.

@dkahle dkahle closed this as completed Jun 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants