【问题标题】:How to set Google map marker bouncing?如何设置谷歌地图标记弹跳?
【发布时间】:2011-08-04 06:23:46
【问题描述】:

您好,我需要 Google 位置标记在鼠标悬停时弹跳,例如 http://www.snapdeal.com/deals-bangalore_koramangala_plus .如果单击任何位置标记,此链接将弹跳,如果有人知道,请告诉我...

【问题讨论】:

标签: javascript


【解决方案1】:
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);
});

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2019-11-22
    • 2019-10-11
    • 2016-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-09-13
    • 1970-01-01
    相关资源
    最近更新 更多