Compare commits

...

2 Commits

Author SHA1 Message Date
徐景良 5a7d4643f6 Merge branch 'main' of http://123.132.248.154:10000/HC_YFZX/CaiYuanYiTiHua 2024-08-13 11:22:19 +08:00
徐景良 695748d70e merge 2024-08-13 11:22:15 +08:00
6 changed files with 34 additions and 23 deletions

View File

@ -240,10 +240,7 @@
function mapmouseover(e){ function mapmouseover(e){
console.log("eeeee",e);
window.document.removeEventListener("wheel", (e)=>{
console.log("e1e1e1",e);
});
} }
onMounted(() => { onMounted(() => {
@ -616,7 +613,6 @@
const handlerDrawLineString = () => { const handlerDrawLineString = () => {
mp.draw('LineString'); mp.draw('LineString');
mp.on('LineString', function (e) { mp.on('LineString', function (e) {
console.log("eee",e);
Modal.confirm({ Modal.confirm({
title:'是否确认分割图斑?', title:'是否确认分割图斑?',
onCancel() { onCancel() {
@ -638,8 +634,6 @@
const handlerDrawPolygon = () => { const handlerDrawPolygon = () => {
mp.draw('Polygon'); mp.draw('Polygon');
mp.on('Polygon', function (e) { mp.on('Polygon', function (e) {
console.log("eeeee123",e);
let coordinates = []; let coordinates = [];
e?.forEach((item,index)=>{ e?.forEach((item,index)=>{
coordinates?.push([item.lng,item.lat]); coordinates?.push([item.lng,item.lat]);

View File

@ -19,6 +19,7 @@
<div <div
id="form-container" id="form-container"
@mousemove="onFormContainerMouseOver"
style="position: relative" style="position: relative"
:class="mapConfig?.isShowMap ? 'form-container' : ''" :class="mapConfig?.isShowMap ? 'form-container' : ''"
> >
@ -976,6 +977,11 @@
onBeforeMount(() => { onBeforeMount(() => {
getTaskInfo(); getTaskInfo();
}); });
function onFormContainerMouseOver(event){
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
::v-deep .ant-tabs-nav-wrap { ::v-deep .ant-tabs-nav-wrap {

View File

@ -6,7 +6,7 @@
<div style="position: absolute; right:160px; bottom: 20px; z-index:1;"> <div style="position: absolute; right:160px; bottom: 20px; z-index:1;">
<div :class="`button-item ${buttonSelect == 1? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(1)"></div> <div :class="`button-item ${buttonSelect == 1? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(1)"></div>
<div :class="`button-item ${buttonSelect == 2? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(2)"></div> <div :class="`button-item ${buttonSelect == 2? 'button-select': ''}`" style="margin-bottom: 10px" @click="changeLayer(2)"></div>
<div :class="`button-item ${buttonSelect == 3? 'button-select': ''}`" @click="changeLayer(3)"></div> <!-- <div :class="`button-item ${buttonSelect == 3? 'button-select': ''}`" @click="changeLayer(3)"></div> -->
</div> </div>
<div class="legend"> <div class="legend">

View File

@ -52,13 +52,13 @@ const initMap = () => {
], ],
tileSize: 256, tileSize: 256,
}, },
'raster-tiles-geo': { // 'raster-tiles-geo': {
type: 'raster', // type: 'raster',
tiles: [ // tiles: [
VITE_GLOB_YINGXIANG_SERVER, // VITE_GLOB_YINGXIANG_SERVER,
], // ],
tileSize: 256, // tileSize: 256,
} // }
}, },
layers: [ layers: [
{ {
@ -73,11 +73,11 @@ const initMap = () => {
source: 'raster-tiles', source: 'raster-tiles',
maxZoom:32, maxZoom:32,
}, },
{ // {
id: 'tdt-wms-tiles', // id: 'tdt-wms-tiles',
type: 'raster', // type: 'raster',
source: 'raster-tiles-geo', // source: 'raster-tiles-geo',
}, // },
], ],
}, },
maxZoom: 22, maxZoom: 22,
@ -517,7 +517,7 @@ function handlerLoadMaskLayer(){
}, },
paint: { paint: {
'fill-color': '#ffffff', 'fill-color': '#ffffff',
'fill-opacity': 0.8 /* 透明度 */, 'fill-opacity': 1 /* 透明度 */,
}, },
layout: { layout: {
visibility: 'visible', visibility: 'visible',

View File

@ -100,7 +100,7 @@ const initMap = () => {
} }
], ],
}, },
maxZoom:22, maxZoom:24,
minZoom:8, minZoom:8,
zoom: 10, zoom: 10,
pitch:0, pitch:0,
@ -317,7 +317,10 @@ function handlerLoadMaskLayer(){
// //
function handlerLoadHeatLayer(heatdata){ function handlerLoadHeatLayer(heatdata){
console.log("heatdata123",heatdata); // console.log("heatdata123",heatdata);
// heatdata.features = heatdata.features.slice(0,2000);
// let rediusProportion = heatdata.features.length/333;
if(map.getSource("heatSource")){ if(map.getSource("heatSource")){
map.getSource("heatSource").setData(heatdata); map.getSource("heatSource").setData(heatdata);
}else{ }else{

View File

@ -58,6 +58,8 @@
`http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${TINADITU_TOKEN}`, `http://t0.tianditu.gov.cn/DataServer?T=img_w&x={x}&y={y}&l={z}&tk=${TINADITU_TOKEN}`,
], ],
tileSize: 256, tileSize: 256,
minzoom:0,
maxzoom:15,
}, },
yingxiang: { yingxiang: {
type: 'raster', type: 'raster',
@ -66,6 +68,8 @@
// 'http://175.27.168.120:8080/geoserver/feixian/wms?service=WMS&version=1.1.0&request=GetMap&layers=feixian:yingxiang&styles=&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&format=image/png&TRANSPARENT=TRUE' // 'http://175.27.168.120:8080/geoserver/feixian/wms?service=WMS&version=1.1.0&request=GetMap&layers=feixian:yingxiang&styles=&bbox={bbox-epsg-3857}&width=256&height=256&srs=EPSG:3857&format=image/png&TRANSPARENT=TRUE'
], ],
tileSize: 256, tileSize: 256,
minzoom:13,
maxzoom:24,
}, },
}, },
layers: [ layers: [
@ -84,6 +88,8 @@
layout: { layout: {
visibility: 'visible', visibility: 'visible',
}, },
maxzoom:15,
minzoom:0
}, },
{ {
id: 'yingxiang', id: 'yingxiang',
@ -92,6 +98,8 @@
layout: { layout: {
visibility: 'visible', visibility: 'visible',
}, },
minzoom:13,
maxzoom:24
}, },
{ {
id: 'dianzi', id: 'dianzi',