|
@ -246,7 +246,7 @@ |
|
|
// 初始化瓦片 |
|
|
// 初始化瓦片 |
|
|
// 瓦片图需要切好每个位置的图 |
|
|
// 瓦片图需要切好每个位置的图 |
|
|
// x,y,z 为上图的坐标 |
|
|
// x,y,z 为上图的坐标 |
|
|
new TMap.ImageTileLayer({ |
|
|
let imageTile = new TMap.ImageTileLayer({ |
|
|
getTileUrl: function(x, y, z) { |
|
|
getTileUrl: function(x, y, z) { |
|
|
console.log(x, y, z) |
|
|
console.log(x, y, z) |
|
|
//拼接瓦片URL |
|
|
//拼接瓦片URL |
|
@ -269,6 +269,13 @@ |
|
|
map: this.mapObj, //设置图层显示到哪个地图实例中 |
|
|
map: this.mapObj, //设置图层显示到哪个地图实例中 |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.$nextTick(()=>{ |
|
|
|
|
|
var layerId = imageTile.getId() // 获取图层ID |
|
|
|
|
|
// 根据输入 LAYER_LEVEL 常量调整 layerId 对应图层的渲染层级 ,其中layerId可以通过图层getId方法获取。 |
|
|
|
|
|
// TMap.constants.LAYER_LEVEL 代表图层级别常量,见帮助文档(https://lbs.qq.com/webApi/javascriptGL/glDoc/docIndexMap) |
|
|
|
|
|
this.mapObj.moveLayer(layerId, TMap.constants.LAYER_LEVEL.TEXT) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
// 创建点聚合实例 |
|
|
// 创建点聚合实例 |
|
|
// this.markerCluster = new TMap.MarkerCluster({ |
|
|
// this.markerCluster = new TMap.MarkerCluster({ |
|
|
// id: "cluster", |
|
|
// id: "cluster", |
|
|