gpt4 book ai didi

r - 如何使用 R 的 Google 卫星 View 作为传单中的图 block

转载 作者:行者123 更新时间:2023-12-02 01:16:58 28 4
gpt4 key购买 nike

许多问题看起来与我的相似,但我无法找到适合 R 的答案。

到目前为止,我以这种方式使用很棒的 R leaflet(和 ggmap)包:

library(ggmap)
library(leaflet)

coord <-geocode('New York')

map.city <- leaflet() %>%
addTiles('http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png?apikey=68c4cd328d3b484091812a76fae093fd') %>%
setView(coord$lon, coord$lat, zoom = 11)

但是如果我想要 Google 卫星 map 怎么办?

我浏览了这篇文章

https://stackoverflow.com/questions/9394190/leaflet-map-api-with-google-satellite-layer#=

但不明白如何使用那里定义的 googleSat 函数。

最佳答案

如果必须是谷歌卫星图像,您可以使用 googleway包裹。如果其他卫星图像没问题,您可以在传单中使用带有或不带“CartoDB.PositronOnlyLabels”的“Esri.WorlImagery”:

library(ggmap)
library(leaflet)

coord <-geocode('New York')

map.city <- leaflet() %>% addProviderTiles('Esri.WorldImagery') %>%
setView(coord$lon, coord$lat, zoom = 11)
map.city %>% addProviderTiles("CartoDB.PositronOnlyLabels")

关于r - 如何使用 R 的 Google 卫星 View 作为传单中的图 block ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44678039/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com