fix:修改地图
This commit is contained in:
@@ -263,22 +263,22 @@ export default {
|
||||
* @return {*}
|
||||
*/
|
||||
initMap() {
|
||||
// const tianditu_vec_c = new TileLayer({
|
||||
// className: "baseLayerClass",
|
||||
// title: "矢量底图",
|
||||
// id: "vec_c",
|
||||
// source: new XYZ({
|
||||
// url: "http://t{0-7}.tianditu.com/DataServer?x={x}&y={y}&l={z}&T=vec_c&tk=1eb44fae5b9dc454442b322e9a41d233",
|
||||
// projection: "EPSG:4326",
|
||||
// }),
|
||||
// visible: true,
|
||||
// });
|
||||
const tianditu_vec_c = new TileLayer({
|
||||
className: "baseLayerClass",
|
||||
title: "矢量底图",
|
||||
id: "vec_c",
|
||||
source: new XYZ({
|
||||
url: "http://10.60.5.242:25033/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
});
|
||||
const tianditu_cva_c = new TileLayer({
|
||||
className: "baseLayerClass",
|
||||
title: "矢量地图",
|
||||
id: "cva_c",
|
||||
source: new XYZ({
|
||||
url: "https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
url: "http://10.60.5.242:25003/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
|
||||
// projection: "EPSG:4326",
|
||||
}),
|
||||
visible: true,
|
||||
@@ -306,7 +306,7 @@ export default {
|
||||
minZoom: 7,
|
||||
maxZoom: 18,
|
||||
}),
|
||||
layers: [tianditu_img_c, tianditu_cva_c],
|
||||
layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c],
|
||||
});
|
||||
// 图层点击事件
|
||||
map.on("singleclick", (e) => {
|
||||
|
||||
Reference in New Issue
Block a user