This commit is contained in:
duanxiaohai 2024-07-24 14:59:07 +08:00
parent 528040b8fc
commit a710409561
3 changed files with 14 additions and 0 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -498,6 +498,7 @@ body {
width: 180px; width: 180px;
height: 180px; height: 180px;
position: relative; position: relative;
cursor: pointer;
.fiTop { .fiTop {
width: 100%; width: 100%;
img { img {

View File

@ -319,11 +319,24 @@ const xkzCenter = reactive([
}, },
]); ]);
var map = null; 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 = () => { const initMap = () => {
map = new BMapGL.Map("map", { minZoom: 11, maxZoom: 20 }); map = new BMapGL.Map("map", { minZoom: 11, maxZoom: 20 });
map.enableScrollWheelZoom(true); map.enableScrollWheelZoom(true);
map.setMapType(BMAP_EARTH_MAP); map.setMapType(BMAP_EARTH_MAP);
goMapCenter([119.178783, 29.034583], 12); goMapCenter([119.178783, 29.034583], 12);
BMAP();
// //
loadTown(); loadTown();
// //