Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/463.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 如何设置谷歌地图标记反弹?_Javascript - Fatal编程技术网

Javascript 如何设置谷歌地图标记反弹?

Javascript 如何设置谷歌地图标记反弹?,javascript,Javascript,嗨,我需要谷歌定位标记弹跳鼠标时,像 。如果单击任何位置标记,此链接将反弹,如果有人知道,请告诉我…重复的 GEvent.addListener(this, "mouseover", function() { var ToPixel = new GPoint(); var AddOffset = new GPoint(); var ToLatlag = new GLatLng(); var currentProjection = G_NORMAL_MAP.getProje

嗨,我需要谷歌定位标记弹跳鼠标时,像 。如果单击任何位置标记,此链接将反弹,如果有人知道,请告诉我…

重复的
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);
});