Closed danzhuibing closed 7 years ago
I want to use Tencent Map in leaflet for R, but failed. Tecent Map is following in TMS standard, so I set tms=TRUE in TileOptions. But it does not work. Here is the full code:
tms=TRUE
TileOptions
leaflet() %>% addTiles( 'http://rt1.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0', tileOptions(tms=TRUE, tileSize=256, minZoom=9, maxZoom=17), attribution = '© Tencent Map</a>' ) %>% setView(116.40,39.90, zoom = 10)
But when I use leaflet in js, it works:
var mymap = L.map('mapid').setView([39.90, 116.40], 10); L.tileLayer('http://rt1.map.gtimg.com/realtimerender?z={z}&x={x}&y={y}&type=vector&style=0', { maxZoom: 18, attribution: '© Tencent Map ', tms: true }).addTo(mymap);
In addition, I found that some other options also not work, like subdomains.
subdomains
You're passing it as the second argument which is not right. Pass it by explicitly setting the options argument.
thanks~
I want to use Tencent Map in leaflet for R, but failed. Tecent Map is following in TMS standard, so I set
tms=TRUE
inTileOptions
. But it does not work. Here is the full code:But when I use leaflet in js, it works:
In addition, I found that some other options also not work, like
subdomains
.