This commit is contained in:
parent
528040b8fc
commit
a710409561
|
@ -498,6 +498,7 @@ body {
|
|||
width: 180px;
|
||||
height: 180px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
.fiTop {
|
||||
width: 100%;
|
||||
img {
|
||||
|
|
|
@ -319,11 +319,24 @@ const xkzCenter = reactive([
|
|||
},
|
||||
]);
|
||||
var map = null;
|
||||
|
||||
const BMAP = () => {
|
||||
// 添加鼠标点击事件监听器
|
||||
map.addEventListener("click", function (e) {
|
||||
console.log(e.point, 666);
|
||||
// console.log(e.latlng, 666);
|
||||
var pt = e.point; // 获取点击的坐标
|
||||
var marker = new BMapGL.Marker(pt); // 创建标注
|
||||
map.addOverlay(marker); // 将标注添加到地图中
|
||||
});
|
||||
};
|
||||
|
||||
const initMap = () => {
|
||||
map = new BMapGL.Map("map", { minZoom: 11, maxZoom: 20 });
|
||||
map.enableScrollWheelZoom(true);
|
||||
map.setMapType(BMAP_EARTH_MAP);
|
||||
goMapCenter([119.178783, 29.034583], 12);
|
||||
BMAP();
|
||||
//加载乡镇信息
|
||||
loadTown();
|
||||
//渲染地块
|
||||
|
|
Loading…
Reference in New Issue