Tencent mobile location services end trigger problems

Man of few words said, this is the first time to write a blog. I started on the Internet also looked for related problems. But I only ask not answer, here is a simple pit talk about my experience.

First of all, I solemnly explain, I contacted this only two weeks, it is also sprouting new hope you will care about (with a glass heart)

Here trigger on events there are two, one is addDomListener (element: HTMLElement, eventName: String, handler: Function) binding events, the other is the addListener (instance: Object, eventName: String, handler: Function) to register an event

Click here eventName have click events, mousedown this is a click event but only for addDomListener binding events

I just started registration click event covered by marker. Then on the mobile terminal it is not possible (but Google's browser ....)

Then stop looking for online information and to see the official documents. Eventually I found addDomListener binding events with mousedown keywords can be used on mobile end

Finally, I do not know why, but after all, so. We hope to have learned little friends like a point

Crippled Code:

marker = new qq.maps.Marker({
position: new qq.maps.LatLng(39.99865,116.27100),
map: map,
});
qq.maps.event.addDomListener(marker, 'mousedown', function(event){
//information
infoWin.open();
// tips custom content
infoWin.setContent('<div style="width:200px;height:50px;padding-top:10px;">'+
'<div style="font-size:20px;color:  #1E90FF;font-weight:bolder;">画中游'+
'</div>'+
'</div>');
infoWin.setPosition(event.latLng);
})

Guess you like

Origin www.cnblogs.com/pyqHome/p/11262947.html