【发布时间】:2011-08-04 06:23:46
【问题描述】:
您好,我需要 Google 位置标记在鼠标悬停时弹跳,例如 http://www.snapdeal.com/deals-bangalore_koramangala_plus .如果单击任何位置标记,此链接将弹跳,如果有人知道,请告诉我...
【问题讨论】:
标签: javascript
您好,我需要 Google 位置标记在鼠标悬停时弹跳,例如 http://www.snapdeal.com/deals-bangalore_koramangala_plus .如果单击任何位置标记,此链接将弹跳,如果有人知道,请告诉我...
【问题讨论】:
标签: javascript
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);
});
【讨论】: