-
Notifications
You must be signed in to change notification settings - Fork 630
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
请问如何结合bingMap使用? #2417
Comments
hi @limp0509, welcome! |
用 bing 地图还是bing 的底图瓦片服务?目前不支持 bing 地图结合使用 |
得用bing 的底图瓦片服务- - |
|
bing 地图的瓦片投影的实现需要把 xy 坐标转换为四叉树的字符串 QuadKeys,xy 轴转换成 quadKeys 传入 {quadKeys} 中
RasterLayer 可以通过 urlTemplate 支持用 function 来实现你的需求 const url1 =
'http://r1.tiles.ditu.live.com/tiles/';
const layer1 = new RasterLayer({
zIndex: 1,
}).source(url1, {
parser: {
type: 'rasterTile',
tileSize: 256,
getURLFromTemplate: (template: string, properties: { x: number; y: number; z: number }) => {
// 通过 x,y,z 计算 quadkey 和 url
const quadKey = ?;
return `${template}/r${quadKeys}.png?g=100&mkt=zh-cn`;
}
},
}); |
Compute quad key string for given x/y tile coordinates and zoom level https://github.com/meteotest/quadkeys/blob/master/index.js#L33-L60 |
|
谢谢,一开始我只有一个微软地图申请的key,不清楚怎么用avtvl7去输入微软地图的key生成地图,后面参考一个叫leaflet-bing-layer的库,生成出来了,https://github.com/digidem/leaflet-bing-layer
leaflet-bing.ts代码
|
vur3,做的国际项目,客户指定要使用微软的bing地图,谢谢大佬了
The text was updated successfully, but these errors were encountered: