fix:修改配置内外网项目

This commit is contained in:
2024-12-12 10:04:51 +08:00
parent 3aaeae0ca1
commit 60f3d0fc1a
6 changed files with 79 additions and 63 deletions
+28 -13
View File
@@ -2,7 +2,7 @@
* @Author: SunTao 328867980@qq.com
* @Date: 2024-10-14 10:46:23
* @LastEditors: SunTao 328867980@qq.com
* @LastEditTime: 2024-12-09 15:13:56
* @LastEditTime: 2024-12-12 09:21:59
* @FilePath: \znxjxt-ui\src\components\map\fssm-map.vue
* @Description: 公共地图
-->
@@ -263,22 +263,34 @@ export default {
* @return {*}
*/
initMap() {
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_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: "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,
// });
// 外网
const tianditu_cva_c = new TileLayer({
className: "baseLayerClass",
title: "矢量地图",
id: "cva_c",
source: new XYZ({
url: "http://10.60.5.242:25003/v3/tile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
url: "https://webrd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",
// projection: "EPSG:4326",
}),
visible: true,
@@ -306,7 +318,10 @@ export default {
minZoom: 7,
maxZoom: 18,
}),
layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c],
// 内网
// layers: [tianditu_cva_c, tianditu_vec_c, tianditu_img_c],
// 外网
layers: [tianditu_cva_c, tianditu_img_c],
});
// 图层点击事件
map.on("singleclick", (e) => {