This commit is contained in:
parent
40c2f0999a
commit
8f52a5c27d
|
@ -391,38 +391,6 @@ const xkzCenter = reactive([
|
|||
var map = null;
|
||||
// 鼠标点击添加点位
|
||||
let currentMarker = null; // 用于保存当前标记的引用
|
||||
<<<<<<< HEAD
|
||||
const BMAP = (name) => {
|
||||
// console.log(name, 666);
|
||||
// 添加鼠标点击事件监听器
|
||||
map.addEventListener("click", function (e) {
|
||||
console.log(`${e.latlng.lng},${e.latlng.lat} `, name, 777);
|
||||
// xkzCenter.forEach((item, index) => {
|
||||
// if (item.name == name) {
|
||||
// item.center = [e.latlng.lng, e.latlng.lat];
|
||||
// }
|
||||
// // console.log(item.center);
|
||||
// });
|
||||
// console.log(xkzCenter,888);
|
||||
// addCs();
|
||||
// 检查并移除当前标记
|
||||
if (currentMarker !== null) {
|
||||
map.removeOverlay(currentMarker);
|
||||
}
|
||||
// 创建新标记
|
||||
let icons = new BMapGL.Icon(AED, new BMapGL.Size(24, 62));
|
||||
marker.value = new BMapGL.Marker(
|
||||
new BMapGL.Point(e.latlng.lng, e.latlng.lat),
|
||||
{
|
||||
icon: icons,
|
||||
}
|
||||
);
|
||||
|
||||
// 将新标记添加到地图中并更新当前标记引用
|
||||
map.addOverlay(marker.value);
|
||||
currentMarker = marker.value;
|
||||
// addCs();
|
||||
=======
|
||||
const markera = (e) => {
|
||||
// console.log(`${e.latlng.lng},${e.latlng.lat} `, "name");
|
||||
// 检查并移除当前标记
|
||||
|
@ -433,7 +401,6 @@ const markera = (e) => {
|
|||
let icons = new BMapGL.Icon(AED, new BMapGL.Size(24, 62));
|
||||
var marker = new BMapGL.Marker(new BMapGL.Point(e.latlng.lng, e.latlng.lat), {
|
||||
icon: icons,
|
||||
>>>>>>> 5f87d337a21a3b331619d0bbf01cb87ac10df9cc
|
||||
});
|
||||
// 将新标记添加到地图中并更新当前标记引用
|
||||
map.addOverlay(marker);
|
||||
|
@ -518,12 +485,7 @@ const addPolygonCounty = () => {
|
|||
cfjiedao.value = item.name;
|
||||
let jdCenter = [];
|
||||
if (item.name == "溪口镇") {
|
||||
<<<<<<< HEAD
|
||||
cfJd.value = item.name;
|
||||
getDatas2("溪口镇", choose.value.person);
|
||||
=======
|
||||
BMAP();
|
||||
>>>>>>> 5f87d337a21a3b331619d0bbf01cb87ac10df9cc
|
||||
if (!title_choose.value.includes("溪口镇")) {
|
||||
title_choose.value = title_choose.value + `>${item.name}`;
|
||||
}
|
||||
|
@ -725,10 +687,6 @@ const addCsChoose = () => {
|
|||
chooseCsList.value.map((item, index) => {
|
||||
console.log("item11", item.name);
|
||||
sqname.value = item.name;
|
||||
<<<<<<< HEAD
|
||||
// BMAP(item.name);
|
||||
=======
|
||||
>>>>>>> 5f87d337a21a3b331619d0bbf01cb87ac10df9cc
|
||||
let fillColor = "blue";
|
||||
//地区的坐标范围
|
||||
let points = [];
|
||||
|
|
Loading…
Reference in New Issue