本地geojson删除
parent
4758f47632
commit
3a887b70ce
|
|
@ -1286,7 +1286,6 @@
|
|||
// 根据图片名检索标签
|
||||
let currentIndex = null;
|
||||
imageList.value?.forEach((item,index)=>{
|
||||
console.log("filePath123",item.filePath,fileName);
|
||||
if(item.filePath?.match(fileName)){
|
||||
currentIndex = index;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -152,6 +152,7 @@
|
|||
<a-image-preview-group
|
||||
:preview="{
|
||||
getContainer:getContainer,
|
||||
onVisibleChange:handlerImageChange
|
||||
}"
|
||||
>
|
||||
<template v-for="(imageItem, imageIndex) in anjianzhaopianList" :key="imageIndex">
|
||||
|
|
@ -500,7 +501,7 @@
|
|||
zhengshiImageList.push(imageList.value[index]);
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
// console.log("imageList",imageList.value);
|
||||
// console.log("anjianzhaopianList",anjianzhaopianList.value);
|
||||
// console.log("zhengshiImageList",zhengshiImageList);
|
||||
|
|
@ -518,12 +519,39 @@
|
|||
|
||||
}
|
||||
|
||||
const isInitImageLisener = ref<Boolean>(false);
|
||||
// 监听预览图片地址变化进行箭头切换
|
||||
function handlerImageChange(e):void{
|
||||
if(e && !isInitImageLisener.value){
|
||||
setTimeout(function(){
|
||||
const targetNode = document.getElementsByClassName('ant-image-preview-img');
|
||||
// 创建一个观察器实例,并传入回调函数
|
||||
const observer = new MutationObserver((mutationsList) => {
|
||||
for (const mutation of mutationsList) {
|
||||
if (mutation.type === 'attributes') {
|
||||
if(targetNode[0].getAttribute(mutation.attributeName).match("http")){
|
||||
handlerPreviewImage(0,targetNode[0].getAttribute(mutation.attributeName))
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
// 配置观察选项
|
||||
const config = { attributes: true };
|
||||
// 开始观察目标节点
|
||||
observer.observe(targetNode[0], config);
|
||||
isInitImageLisener.value = true;
|
||||
},250)
|
||||
}
|
||||
}
|
||||
|
||||
onBeforeMount(()=>{
|
||||
|
||||
})
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const anjianzhaopianList = computed(() => {
|
||||
getCaseImgList();
|
||||
return anjianzhaopian ? anjianzhaopian.split(',') : [];
|
||||
|
|
|
|||
|
|
@ -513,8 +513,21 @@ const handlerLoadCountyLayer = (geojson)=>{
|
|||
)
|
||||
}
|
||||
}
|
||||
|
||||
function getMaskData(){
|
||||
axios({
|
||||
method:"get",
|
||||
url:`http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Ashijie&maxFeatures=50&outputFormat=application%2Fjson`,
|
||||
}).then(res=>{
|
||||
let geojson = {DATA:res.data.features[0].geometry.coordinates[0][0]}
|
||||
|
||||
handlerLoadMaskLayer(geojson);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 加载地图遮罩
|
||||
function handlerLoadMaskLayer(){
|
||||
function handlerLoadMaskLayer(geojson){
|
||||
map.addLayer({
|
||||
//蒙版图层 //通过边界数据反选 达到挖洞效果
|
||||
id: 'mb-tag',
|
||||
|
|
@ -533,7 +546,7 @@ function handlerLoadMaskLayer(){
|
|||
[180, -90],
|
||||
[-180, -90],
|
||||
],
|
||||
waiData.DATA,
|
||||
geojson.DATA,
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
@ -705,7 +718,8 @@ onMounted(()=>{
|
|||
// });;
|
||||
|
||||
handlerCheckUserOrgs();
|
||||
handlerLoadMaskLayer();
|
||||
// handlerLoadMaskLayer();
|
||||
getMaskData();
|
||||
handlerDealStreet();
|
||||
handlerDealCountry();
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,6 @@ import { generateUUID} from '@/components/MapboxMaps/src/tool'
|
|||
import { WktToGeojson } from '@/components/MapboxMaps/src/WktGeojsonTransform';
|
||||
import mapboxgl,{ Map, Popup } from 'mapbox-gl';
|
||||
import {MAPBOX_TOKEN,TINADITU_TOKEN,MAP_VIEWER} from './config.ts'
|
||||
import heatGeoJson from './data.json'
|
||||
import {getPolygonCenter} from '@/api/tiankongdi'
|
||||
import axios from 'axios'
|
||||
import { waiData } from "./linyishi";
|
||||
|
|
@ -280,41 +279,57 @@ async function handlerDealPoint(code=""){
|
|||
map.moveLayer("unclustered-point","heatLayer")
|
||||
}
|
||||
|
||||
}
|
||||
// 获取遮罩数据
|
||||
function getMaskData(){
|
||||
axios({
|
||||
method:"get",
|
||||
url:`http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Ashijie&maxFeatures=50&outputFormat=application%2Fjson`,
|
||||
}).then(res=>{
|
||||
let geojson = {DATA:res.data.features[0].geometry.coordinates[0][0]}
|
||||
|
||||
handlerLoadMaskLayer(geojson);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 加载地图遮罩
|
||||
function handlerLoadMaskLayer(){
|
||||
function handlerLoadMaskLayer(geojson){
|
||||
map.addLayer({
|
||||
//蒙版图层 //通过边界数据反选 达到挖洞效果
|
||||
id: 'mb-tag',
|
||||
type: 'fill',
|
||||
source: {
|
||||
type: 'geojson',
|
||||
data: {
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Polygon',
|
||||
coordinates: [
|
||||
[
|
||||
// 多边形外围 需要进行遮罩的点 这里是给世界地图加遮罩 所以是世界的四个端点
|
||||
[-180, 90],
|
||||
[180, 90],
|
||||
[180, -90],
|
||||
[-180, -90],
|
||||
],
|
||||
waiData.DATA,
|
||||
//蒙版图层 //通过边界数据反选 达到挖洞效果
|
||||
id: 'mb-tag',
|
||||
type: 'fill',
|
||||
source: {
|
||||
type: 'geojson',
|
||||
data: {
|
||||
type: 'Feature',
|
||||
geometry: {
|
||||
type: 'Polygon',
|
||||
coordinates: [
|
||||
[
|
||||
// 多边形外围 需要进行遮罩的点 这里是给世界地图加遮罩 所以是世界的四个端点
|
||||
[-180, 90],
|
||||
[180, 90],
|
||||
[180, -90],
|
||||
[-180, -90],
|
||||
],
|
||||
},
|
||||
geojson.DATA,
|
||||
],
|
||||
},
|
||||
},
|
||||
paint: {
|
||||
'fill-color': '#ffffff',
|
||||
'fill-opacity': 1 /* 透明度 */,
|
||||
},
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
paint: {
|
||||
'fill-color': '#ffffff',
|
||||
'fill-opacity': 1 /* 透明度 */,
|
||||
},
|
||||
layout: {
|
||||
visibility: 'visible',
|
||||
},
|
||||
});
|
||||
|
||||
if(map.getLayer('countyLayer')){
|
||||
map.moveLayer("countyLayer","mb-tag")
|
||||
}
|
||||
}
|
||||
|
||||
// 加载热力图图斑数据
|
||||
|
|
@ -511,9 +526,9 @@ const handlerLoadCountyLayer = (geojson)=>{
|
|||
}
|
||||
}
|
||||
)
|
||||
// map.moveLayer("heatLayer","countLayer");
|
||||
// map.moveLayer("historyLayerLine","countLayer");
|
||||
// map.moveLayer("historyLayerFill","countLayer");
|
||||
if(map.getLayer('mb-tag')){
|
||||
map.moveLayer("countyLayer","mb-tag")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -651,7 +666,8 @@ onMounted(()=>{
|
|||
// handlerDealCountry();
|
||||
// handlerDealPoint();
|
||||
// handlerLoadPolygon();
|
||||
handlerLoadMaskLayer();
|
||||
// handlerLoadMaskLayer();
|
||||
getMaskData();
|
||||
emits("onload");
|
||||
map.on("click",(e)=>{
|
||||
var center = map.getCenter(); // 获取当前视图中心点
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -10,7 +10,6 @@
|
|||
import heatGeoJson from './data.json';
|
||||
import { getPolygonCenter } from '@/api/tiankongdi';
|
||||
import axios from 'axios';
|
||||
import { waiData } from './linyishi';
|
||||
import { getAppEnvConfig } from '@/utils/env';
|
||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||
const VITE_GLOB_API_URL_VAR = ref<String>(VITE_GLOB_API_URL);
|
||||
|
|
@ -319,8 +318,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
// 获取遮罩数据
|
||||
function getMaskData(){
|
||||
axios({
|
||||
method:"get",
|
||||
url:`http://120.222.154.7:8090/geoserver/linyishi/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=linyishi%3Ashijie&maxFeatures=50&outputFormat=application%2Fjson`,
|
||||
}).then(res=>{
|
||||
let geojson = {DATA:res.data.features[0].geometry.coordinates[0][0]}
|
||||
handlerLoadMaskLayer(geojson);
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
// 加载地图遮罩
|
||||
function handlerLoadMaskLayer() {
|
||||
function handlerLoadMaskLayer(geojson) {
|
||||
map.addLayer({
|
||||
//蒙版图层 //通过边界数据反选 达到挖洞效果
|
||||
id: 'mb-tag',
|
||||
|
|
@ -339,7 +350,7 @@
|
|||
[180, -90],
|
||||
[-180, -90],
|
||||
],
|
||||
waiData.DATA,
|
||||
geojson.DATA,
|
||||
],
|
||||
},
|
||||
},
|
||||
|
|
@ -661,7 +672,8 @@
|
|||
// handlerDealCountry();
|
||||
// handlerDealPoint();
|
||||
// handlerLoadPolygon();
|
||||
handlerLoadMaskLayer();
|
||||
// handlerLoadMaskLayer();
|
||||
getMaskData();
|
||||
loadMonitorLayer();
|
||||
loadFuFeiLayer();
|
||||
getHangFeiPlanData();
|
||||
|
|
|
|||
Loading…
Reference in New Issue