gpt4 book ai didi

R 传单提供商平铺 basemap - 传递 HERE 的 API 代码 token

转载 作者:行者123 更新时间:2023-12-01 12:27:24 25 4
gpt4 key购买 nike

我正在使用 R 传单包(使用 R Shiny),我想通过“addProviderTiles”函数添加一个 HERE basemap 。如何将 HERE 提供商 basemap 的 App_Id 和 App_Code 传递给 R 中的传单?

示例代码:

m_rent<-leaflet::leaflet() 
m_rent<-setView(m_rent,lng=9.0,lat=47.0,zoom=12)
#### how do I pass the API credentials?
m_rent<-addProviderTiles(m_rent,"HERE.hybridDay",...............)
m_rent

最佳答案

您应该使用 addTiles 函数而不是 addProviderTiles
它以这种方式对我有用:

m_rent<-leaflet::leaflet() 
m_rent<-setView(m_rent,lng=9.0,lat=47.0,zoom=12)
html <- "http://1.aerial.maps.cit.api.here.com/maptile/2.1/maptile/newest/hybrid.day/{z}/{x}/{y}/256/png?app_id={your_app_id}&app_code={your_app_code}&lg=eng"
m_rent<-addTiles(m_rent,html)
m_rent

有关更多信息,您应该检查:

https://developer.here.com/rest-apis/documentation/enterprise-map-tile/topics/quick-start.html http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE.hybridDay

关于R 传单提供商平铺 basemap - 传递 HERE 的 API 代码 token ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37941420/

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