开发者

how to get the google map's pageX when dragend ,the version is v3

this is my code:

google.maps.event.addListener(marker, 'dragend', function(event) {
   alert(event.pageX)//undefined
});

and i want开发者_开发问答 to get the (x,y) about mouse when dragend..

thanks


you can get event.pixel and that will give you a x,y object that is relative to the mapDiv's position. If you want absolute position on the page then you will need to add the offset of the mapDiv to that result.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜