|
@@ -12,9 +12,9 @@ import {myBridge} from "../../unit/map/map.js";
|
|
|
import {useMapStore} from "../../store/mapStore.js";
|
|
|
import {nextTick,ref,onMounted} from "vue";
|
|
|
import {
|
|
|
- AddSingleLayer,
|
|
|
+ AddSingleLayer, AddWhiteMold,
|
|
|
AreaJsonRankShow,
|
|
|
- FeatureThreeDimension,
|
|
|
+ FeatureThreeDimension, GroundPrismEffect,
|
|
|
MapClickByType,
|
|
|
SetBackground
|
|
|
} from "../../unit/map/addLayer.js";
|
|
@@ -27,79 +27,19 @@ export default {
|
|
|
onMounted(()=>{
|
|
|
myBridge.bridgeContent = bridge = new CityGis.Bridge({
|
|
|
id: "i_map",
|
|
|
- url: 'https://cimweb.zjw.sh.cegn.cn:2007/VUE-Map-Tool-Widget/#/jk_map?theme=dark_hyjcsjk&type=3D', //建科发布
|
|
|
- //url: 'http://localhost:8081/#/jk_map?theme=dark_hyjcsjk&type=3D',
|
|
|
+ //url: 'https://cimweb.zjw.sh.cegn.cn:2007/VUE-Map-Tool-Widget/#/jk_map?theme=dark_hyjcsjk&type=3D', //建科发布
|
|
|
+ url: 'http://localhost:8081/#/jk_map?theme=dark_hyjcsjk&type=3D',
|
|
|
onReady: function () {
|
|
|
console.log("地图创建完成")
|
|
|
}
|
|
|
})
|
|
|
MapClickByType('show');
|
|
|
- SetBackground();
|
|
|
+ AddWhiteMold(true);
|
|
|
+ GroundPrismEffect("show")
|
|
|
bridge.addEventListener(arg => {
|
|
|
switch (arg.action) {
|
|
|
case "MapExtentChanged":
|
|
|
let scale = arg.data.scale;
|
|
|
- if(mapStore.currentNum){
|
|
|
- if(scale > 100000 && mapStore.scale <= 100000){
|
|
|
- getMapNum('county',mapStore.currentNum).then(res =>{
|
|
|
- debugger
|
|
|
- let data = res.data.data;
|
|
|
- let zxCount = 0;
|
|
|
- let zxList = ['黄浦区','徐汇区','长宁区','静安区','普陀区','虹口区','杨浦区']
|
|
|
- data.forEach(item =>{
|
|
|
- if(zxList.indexOf(item.name) > -1){
|
|
|
- zxCount += item.value * 1;
|
|
|
- }
|
|
|
- })
|
|
|
- data.push({
|
|
|
- name:"中心城区",
|
|
|
- value:zxCount
|
|
|
- })
|
|
|
- debugger
|
|
|
- AreaJsonRankShow({
|
|
|
- type:"zx",
|
|
|
- status:"show",
|
|
|
- data:data
|
|
|
- });
|
|
|
- })
|
|
|
- }else if(scale > 80000 && mapStore.scale <= 80000 ){
|
|
|
- debugger
|
|
|
- getMapNum('county',mapStore.currentNum).then(res =>{
|
|
|
- debugger
|
|
|
- let data = res.data.data
|
|
|
- AreaJsonRankShow({
|
|
|
- type:"qx",
|
|
|
- status:"show",
|
|
|
- data:data
|
|
|
- });
|
|
|
- })
|
|
|
- }else if(scale < 70000 && mapStore.scale >= 70000){
|
|
|
- getMapNum('street',mapStore.currentNum).then(res =>{
|
|
|
- debugger
|
|
|
- let data = res.data.data
|
|
|
- AreaJsonRankShow({
|
|
|
- type:"jz",
|
|
|
- status:"show",
|
|
|
- data:data
|
|
|
- });
|
|
|
- })
|
|
|
- }
|
|
|
- if(scale < 6000 && mapStore.scale >= 6000){
|
|
|
- debugger
|
|
|
- FeatureThreeDimension({
|
|
|
- url:mapStore.currentLayer.ADDRESS,
|
|
|
- token:mapStore.currentLayer.TOKEN,
|
|
|
- status:"show"
|
|
|
- });
|
|
|
- }else if(scale > 6000 && mapStore.scale <= 6000){
|
|
|
- debugger
|
|
|
- FeatureThreeDimension({
|
|
|
- url:mapStore.currentLayer.ADDRESS,
|
|
|
- token:mapStore.currentLayer.TOKEN,
|
|
|
- status:"hide"
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
mapStore.scale = scale;
|
|
|
break;
|
|
|
}
|