Error in get_map using ggmap in R

前端 未结 3 1765
予麋鹿
予麋鹿 2020-12-09 15:36

About 90% of the time, when using get_map in ggmap, I get the following error. Can someone please tell me why?

map <- get_map(lo         


        
相关标签:
3条回答
  • 2020-12-09 16:05

    The 403 error is because Google now requires users to register for and use a (free) api key.

    0 讨论(0)
  • 2020-12-09 16:06

    The "zoom = 4" is, per documentation, "reserved for google business users only." I can't find much documented on why this would work intermittently or at all for a non-business user, but that's my best guess.

    0 讨论(0)
  • 2020-12-09 16:10

    The problem is likely related to your API project not being authorized by Google.

    An API project is easy to create, and get authorized:
    Click this link and choose create. Alternatively choose select if you already have a created project, but just need to activate the API. After that choose "Enable". After that your code should work.

    Link again: https://console.developers.google.com/apis/api/static_maps_backend?project=_

    0 讨论(0)
提交回复
热议问题