Reputation: 231
I'm trying to build a map on R with ggmap library and an osm background however I get the bellow error.
library(ggmap) library(osmdata) library(devtools)
mad_map <- get_map(getbb("Limete, Kinshasa"), maptype = "terrain", source = "osm")
Erreur : 'get_openstreetmap' is defunct.Use 'OSM is at least temporarily not supported, see https://github.com/dkahle/ggmap/issues/117.' instead.
See help("Defunct")
Upvotes: 3
Views: 2103
Reputation:
The solution suggested by pbraeutigm works for me too, so the issue might be on a broader scale. Can you provide some information about your R version, package versions, and operating system?
Upvotes: 0
Reputation: 723
For me your code is working. try update your librarys. You can update them through: install.packages, just copy my code. I think you don't need "source =", if you use "osm" but your code still works.
install.packages("ggmap")
library(ggmap)
install.packages("osmdata")
library(osmdata)
install.packages("devtools")
library(devtools)
mad_map <- get_map(getbb("Limete, Kinshasa"), maptype = "terrain", source = "osm")
ggmap(mad_map)
Upvotes: 0