This commit is contained in:
duanxiaohai 2024-07-24 15:20:37 +08:00
parent a710409561
commit 213a9715a3
1 changed files with 5 additions and 4 deletions

View File

@ -323,10 +323,11 @@ var map = null;
const BMAP = () => {
//
map.addEventListener("click", function (e) {
console.log(e.point, 666);
// console.log(e.latlng, 666);
console.log(e.point.latLng.lng,e.point.latLng.lat, 666);
var pt = e.point; //
var marker = new BMapGL.Marker(pt); //
// map.addOverlay(marker);
var marker = new BMapGL.Marker(new BMapGL.Point(e.point.latLng.lng,e.point.latLng.lat)); //
// var marker = new BMapGL.Marker(pt); //
map.addOverlay(marker); //
});
};
@ -336,13 +337,13 @@ const initMap = () => {
map.enableScrollWheelZoom(true);
map.setMapType(BMAP_EARTH_MAP);
goMapCenter([119.178783, 29.034583], 12);
BMAP();
//
loadTown();
//
addPolygonCounty();
//
addJd();
BMAP();
};
const loadTown = () => {
for (let v of mapTown.features) {