I would like to draw a map of Hong Kong basemap using R but it failed. Below is the code and the error R returns:
library(ggmap)
library(ggplot2)
map <- get_map(location = "Hong Kong", zoom = 10, scale = 2, maptype = "roadmap",
source = "google", force = ifelse(source == "google", TRUE, TRUE),
messaging = FALSE, urlonly = FALSE, filename = "ggmapTemp",
crop = TRUE, color = "color", language = "en-EN", api_key)
Error in data.frame(ll.lat = ll[1], ll.lon = ll[2], ur.lat = ur[1], ur.lon = ur[2]) : arguments imply differing number of rows: 0, 1 In addition: Warning message: geocode failed with status OVER_QUERY_LIMIT, location = "Hong Kong"
The above coding is fine for taiwan, china and state, don't know why it failed for Hong Kong.