fix:大屏地图坐标设置,回退坐标转换代码为84
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* @Author: SunTao 328867980@qq.com
|
||||
* @Date: 2024-10-17 11:34:00
|
||||
* @LastEditors: SunTao 328867980@qq.com
|
||||
* @LastEditTime: 2024-10-29 09:40:35
|
||||
* @LastEditTime: 2024-10-29 10:25:21
|
||||
* @FilePath: \znxjxt-ui\src\views\big-screen\index.vue
|
||||
* @Description: 大屏首页
|
||||
-->
|
||||
@@ -452,6 +452,8 @@ export default {
|
||||
} else {
|
||||
this.mapClick = "";
|
||||
this.mapZoom = "";
|
||||
this.clusters = null;
|
||||
this.markLayerLines = null;
|
||||
}
|
||||
},
|
||||
/* 获取地图点位信息 */
|
||||
@@ -494,8 +496,8 @@ export default {
|
||||
features.push(feature);
|
||||
});
|
||||
const clusterSource = new Cluster({
|
||||
distance: 30,
|
||||
minDistance: 30,
|
||||
distance: 40,
|
||||
minDistance: 40,
|
||||
source: new VectorSource({
|
||||
features,
|
||||
}),
|
||||
@@ -537,7 +539,7 @@ export default {
|
||||
/* 获取地图线段点位信息 */
|
||||
getLinePoint() {
|
||||
if (!this.markLayerLines) {
|
||||
mapPciList().then(({ code, data }) => {
|
||||
mapPciList({ type: this.mapClick }).then(({ code, data }) => {
|
||||
if (code === 200) {
|
||||
this.lineString = data.map((item) => {
|
||||
return item.coordinates.split(";").map((it) => {
|
||||
@@ -597,6 +599,13 @@ export default {
|
||||
changeIconType(value) {
|
||||
if (this.mapClick !== value) {
|
||||
this.mapClick = value;
|
||||
if (this.$refs.roadMap) {
|
||||
const map = this.$refs.roadMap.instance.get("map");
|
||||
map.removeLayer(this.markLayerLines);
|
||||
map.removeLayer(this.clusters);
|
||||
this.clusters = null;
|
||||
this.markLayerLines = null;
|
||||
}
|
||||
// 获取对应右上角icon类型
|
||||
this.getIconType(value);
|
||||
// 请求地图打点/绘制线段接口
|
||||
@@ -666,9 +675,9 @@ export default {
|
||||
/* 地图缩放完成事件 */
|
||||
mapMoveend(zoom) {
|
||||
if (this.clusters && zoom > 13) {
|
||||
this.clusters.getSource().setDistance(1);
|
||||
this.clusters.getSource().setDistance(0);
|
||||
} else if (this.clusters && zoom <= 13) {
|
||||
this.clusters.getSource().setDistance(30);
|
||||
this.clusters.getSource().setDistance(40);
|
||||
}
|
||||
},
|
||||
/* 地图选中feature事件 */
|
||||
|
||||
Reference in New Issue
Block a user