|
|
|
@ -135,6 +135,7 @@ export default {
|
|
|
|
|
eventList:[],
|
|
|
|
|
map:null,
|
|
|
|
|
basemap:null,
|
|
|
|
|
layerVectorLabel: null,
|
|
|
|
|
loading:false,
|
|
|
|
|
mapLoading:false,
|
|
|
|
|
mapLayers: {
|
|
|
|
@ -150,7 +151,8 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
login("admin",encrypt("Suanfa@2024//**...")).then(res=>{
|
|
|
|
|
setToken(res.token)
|
|
|
|
|
localStorage.setItem('Admin-Token',res.token)
|
|
|
|
|
// setToken(res.token)
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.initMap();
|
|
|
|
|
});
|
|
|
|
@ -183,10 +185,28 @@ export default {
|
|
|
|
|
zoomControl: false,
|
|
|
|
|
});
|
|
|
|
|
this.basemap = L.tileLayer.chinaProvider("GaoDe.Normal.Map", {
|
|
|
|
|
maxZoom: 18,
|
|
|
|
|
maxZoom: 14,
|
|
|
|
|
minZoom: 5,
|
|
|
|
|
});
|
|
|
|
|
// this.basemap = L.tileLayer(
|
|
|
|
|
// 'https://t{s}.tianditu.gov.cn/vec_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=vec&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e64b3084dbc6333293d73a1e7b39463e',
|
|
|
|
|
// {
|
|
|
|
|
// maxZoom: 18,
|
|
|
|
|
// minZoom: 9,
|
|
|
|
|
// subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
|
|
|
|
|
// }
|
|
|
|
|
// )
|
|
|
|
|
// 电子底图/灰色底图注记
|
|
|
|
|
// this.layerVectorLabel = L.tileLayer(
|
|
|
|
|
// 'https://t{s}.tianditu.gov.cn/cva_w/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=cva&STYLE=default&TILEMATRIXSET=w&FORMAT=tiles&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}&tk=e64b3084dbc6333293d73a1e7b39463e',
|
|
|
|
|
// {
|
|
|
|
|
// maxZoom: 18,
|
|
|
|
|
// minZoom: 9,
|
|
|
|
|
// subdomains: ['0', '1', '2', '3', '4', '5', '6', '7'],
|
|
|
|
|
// }
|
|
|
|
|
// )
|
|
|
|
|
this.map.addLayer(this.basemap);
|
|
|
|
|
// this.map.addLayer(this.layerVectorLabel)
|
|
|
|
|
|
|
|
|
|
this.map.createPane("mapLayer1");
|
|
|
|
|
this.map.getPane("mapLayer1").style.zIndex = 501;
|
|
|
|
|