Passing by the master, I would like to ask the mobile end to call Baidu map api click on the map of a certain point does not pop up information, but the PC side can?

kneel and beg the masters to take a look, the rookie thanks in advance! Thank you.

clipboard.png

< script type= "text/javascript" >

var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(108.734439, 39.829706), 20);
map.enableScrollWheelZoom(); //
map.enableContinuousZoom(); //
var marker = new BMap.Marker(new BMap.Point(108.734439, 39.829706)); // 
map.addOverlay(marker); // 
//    function showInfo(e){
//        alert(e.point.lng + ", " + e.point.lat);
//    }
//    map.addEventListener("click", showInfo);

< / script >

Dec.28,2021

is not commented by you, click can be used. You can post the complete code


Thank you for helping me answer, thinking that my demo directly from Baidu api comes with this pop-up function, but there is no prompt when it comes to the mobile phone. In fact, there is a simple way to open it on WeChat, https://blog.csdn.net/lixunji., which can directly get the results I want. Thank you in uppercase. Thank you. But I will continue to look for the answer to the above question.


have you solved it? I have the same problem

.
Menu