ggmap stamen watercolor png error

前端 未结 3 1574
花落未央
花落未央 2021-02-09 00:21

I would really appreciate some help / ideas about a problem I am having with ggmap and stamen watercolor.

I keep getting the same error message every time I try to cre

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-02-09 01:06

    I have had the same issue. Note that if you run

    get_map(location='Auckland', source="stamen", maptype="watercolor", zoom=13)
    

    you will get the URL(s) for the tiles you're trying to load in R. When I visit one of the URLs given, it redirects to a .jpg, instead of a .png. Hence the error is accurate - the tiles being served are not in PNG format - they're JPGs.

    Looks like this is a bug in ggmap introduced by a change in Stamen's API. It appears that version 2.4 will address this; see the GitHub commit here: https://github.com/dkahle/ggmap/commit/c7c48947360351f2e86ba13d0457aa3894b51d46.

提交回复
热议问题