新弹窗地图打开函数修改
This commit is contained in:
parent
3f0775ba06
commit
010c292f09
|
@ -23,6 +23,7 @@ import {
|
|||
createCameraDetailsPop,
|
||||
createRoadGovernancePop,
|
||||
createEventListDetailsPop,
|
||||
createEventListDetailsPopNew
|
||||
} from './createMarkerPopup'
|
||||
// 引入资源上图方法
|
||||
import {
|
||||
|
@ -123,7 +124,6 @@ export function MapFun(mapObj) {
|
|||
* @private
|
||||
*/
|
||||
const _openPopupVideoSurveillance = function(feature) {
|
||||
// debugger
|
||||
if (feature.type == 'cameraTree') {
|
||||
const elementHtml = createCameraDetailsPop(feature)
|
||||
const arr = [0, 0.0, '', '0', '0.0']
|
||||
|
@ -134,6 +134,27 @@ export function MapFun(mapObj) {
|
|||
}
|
||||
} else if (feature.type == 'eventList') {
|
||||
const elementHtml = createEventListDetailsPop(feature)
|
||||
L.popup({ className: 'List-Details-pop', offset: [168, 200] }).setLatLng(feature.latLng).setContent(elementHtml).openOn(map)
|
||||
} else {
|
||||
const elementHtml = createSearchAddressTitlePop(feature)
|
||||
L.popup({ className: 'Address-Title-pop', closeButton: false }).setLatLng(feature.latLng).setContent(elementHtml).openOn(map)
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 添加事件弹窗
|
||||
* @param {*} feature
|
||||
*/
|
||||
const _openPopupEventDetailNew = function(feature) {
|
||||
if (feature.type == 'cameraTree') {
|
||||
const elementHtml = createCameraDetailsPop(feature)
|
||||
const arr = [0, 0.0, '', '0', '0.0']
|
||||
if (arr.indexOf(feature.data.gpsX) == -1) {
|
||||
L.popup({ className: 'List-Details-pop', offset: [168, 200] }).setLatLng(feature.latLng).setContent(elementHtml).openOn(map)
|
||||
} else {
|
||||
L.popup({ className: 'List-Details-pop', offset: [168, 200], autoPan: false }).setLatLng(map.getCenter()).setContent(elementHtml).openOn(map)
|
||||
}
|
||||
} else if (feature.type == 'eventList') {
|
||||
const elementHtml = createEventListDetailsPopNew(feature)
|
||||
L.popup({ className: 'Event-List-Details-pop', offset: [168, 200] }).setLatLng(feature.latLng).setContent(elementHtml).openOn(map)
|
||||
} else {
|
||||
const elementHtml = createSearchAddressTitlePop(feature)
|
||||
|
@ -1710,7 +1731,7 @@ export function MapFun(mapObj) {
|
|||
features.map(feature => {
|
||||
var bounds = map.getBounds()
|
||||
// console.log("看看有没有坐标",feature.latLng);
|
||||
debugger
|
||||
//debugger
|
||||
if (layerName == '全部' ? feature.hasOwnProperty('latLng') && bounds.contains(L.latLng(feature.latLng.lat, feature.latLng.lng)) : feature.hasOwnProperty('latLng')) {
|
||||
const marker = L.marker(feature.latLng, { icon })
|
||||
if (createPopupFun !== null) {
|
||||
|
@ -2062,6 +2083,7 @@ export function MapFun(mapObj) {
|
|||
pathAnalysis: _pathAnalysis,
|
||||
openPopup: _openPopup,
|
||||
openPopupVideoSurveillance: _openPopupVideoSurveillance,
|
||||
openPopupEventDetailNew: _openPopupEventDetailNew,
|
||||
openPopupRoadGovernance: _openPopupRoadGovernance,
|
||||
closeAllPopup: _closeAllPopup,
|
||||
addMovingMarker: _addMovingMarker,
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -35,7 +35,7 @@
|
|||
<span>13360907765</span>
|
||||
</p></div>
|
||||
</div>
|
||||
<div class="site-content">
|
||||
<div class="site-content-new">
|
||||
<div class="site-content-title">
|
||||
<div v-for="(item, index) in menuList" :key="index">
|
||||
<div class="item" :class="selectedIndex == index ? 'is-active' : ''" @click="handleCheck(item,index)">
|
||||
|
@ -690,7 +690,7 @@ export default {
|
|||
}
|
||||
}
|
||||
|
||||
.site-content {
|
||||
.site-content-new {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.site-content-title{
|
||||
|
|
|
@ -212,7 +212,7 @@ export default {
|
|||
},
|
||||
];
|
||||
this.$parent.hiMap.mapObj.map.flyTo({ lat: data.latitude, lng: data.longitude });
|
||||
this.$parent.hiMapFun.openPopupVideoSurveillance(EventListDetail[0]);
|
||||
this.$parent.hiMapFun.openPopupEventDetailNew(EventListDetail[0]);
|
||||
this.$parent.hiMapFun.addResourceOnMapWithoutSuperMapCluster(
|
||||
EventListDetail,
|
||||
"poi-event.png",
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
} from "@/api/area";
|
||||
import { gcjLL2wgs84LL } from "@/utils/coordinateSystemTransform";
|
||||
import { createImportantAreaPop } from "@/supermap/createMarkerPopup";
|
||||
import { createImportantAreaPopNew } from '../../../../supermap/createMarkerPopup';
|
||||
|
||||
export default {
|
||||
data() {
|
||||
|
@ -198,6 +199,7 @@
|
|||
},
|
||||
// 行点击
|
||||
analyse(row) {
|
||||
debugger
|
||||
// bus.$emit("openCauseAnalysis", row);
|
||||
this.$parent.hiMapFun.removerPolygon()
|
||||
this.$parent.removeRoadCauseAnalysis()
|
||||
|
@ -213,7 +215,7 @@
|
|||
dataEvent,
|
||||
"poi-red.png",
|
||||
"roadPoint",
|
||||
createImportantAreaPop
|
||||
createImportantAreaPopNew
|
||||
);
|
||||
} else if(row.point) {
|
||||
let arr = JSON.parse(row.point)
|
||||
|
|
|
@ -155,6 +155,7 @@ import {
|
|||
createCameraDetailsPop,
|
||||
createEventListDetailsPop,
|
||||
createImportantAreaPop,
|
||||
createImportantAreaPopNew
|
||||
} from "@/supermap/createMarkerPopup";
|
||||
import {
|
||||
listPassengerFlow,
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="images" v-viewer="{ movable: false }">
|
||||
<div class="images-new" v-viewer="{ movable: false }">
|
||||
<img
|
||||
@click="show"
|
||||
v-show="feature.data.imageUrl && feature.data.imageUrl !== null"
|
||||
|
@ -165,7 +165,7 @@ export default {
|
|||
});
|
||||
},
|
||||
show() {
|
||||
const viewer = this.$el.querySelector(".images").$viewer;
|
||||
const viewer = this.$el.querySelector(".images-new").$viewer;
|
||||
viewer.show();
|
||||
},
|
||||
IntelliURLReplaceIP(url, type) {
|
||||
|
@ -347,7 +347,7 @@ export default {
|
|||
}
|
||||
}
|
||||
}
|
||||
.images {
|
||||
.images-new {
|
||||
width: 320px;
|
||||
height: 200px;
|
||||
margin-left: 35px;
|
||||
|
|
Loading…
Reference in New Issue