如何设置谷歌地图标记弹跳

How to set Google map marker bouncing?

本文关键字:图标 地图 谷歌 何设置 设置      更新时间:2023-09-26

嗨,我需要谷歌的位置标记弹跳时,鼠标在,像http://www.snapdeal.com/deals-bangalore_koramangala_plus这个链接如果点击任何位置标记都会弹跳,如果有人知道请告诉我

GEvent.addListener(this, "mouseover", function() {
   var ToPixel = new GPoint();
   var AddOffset = new GPoint();
   var ToLatlag = new GLatLng();
   var currentProjection = G_NORMAL_MAP.getProjection();
   ToPixel = currentProjection.fromLatLngToPixel(**this.latlng**, this.map.getZoom());
   AddOffset = new GPoint(ToPixel.x,ToPixel.y-2);
   ToLatlag = currentProjection.fromPixelToLatLng(AddOffset,this.map.getZoom());
   this.setLatLng(ToLatlag);
   this.redraw(true);
}); 
GEvent.addListener(this, "mouseout", function() {
   this.setLatLng(this.latlng);
});