I implemented the v3 of google maps in my site. I created custom images to show points on the map.
我在我的网站上实现了谷歌地图的v3。我创建了自定义图像以在地图上显示点。
One of the custom images is 120px X 120px size and i would like to point the arrow of infowindow in the center of this image and not on the top middle.
其中一个自定义图像是120px X 120px大小,我想将infowindow的箭头指向此图像的中心而不是顶部中间。
How can i do that?
我怎样才能做到这一点?
1 个解决方案
#1
30
Try using the pixelOffset option in InfoWindowOptions.
尝试使用InfoWindowOptions中的pixelOffset选项。
myinfo = new google.maps.InfoWindow({
content: "my content",
pixelOffset: new google.maps.Size(0, 60)
});
myinfo.open(map, marker);
Positive y-offset values send the InfoWindow down.
正y偏移值会向下发送InfoWindow。
#1
30
Try using the pixelOffset option in InfoWindowOptions.
尝试使用InfoWindowOptions中的pixelOffset选项。
myinfo = new google.maps.InfoWindow({
content: "my content",
pixelOffset: new google.maps.Size(0, 60)
});
myinfo.open(map, marker);
Positive y-offset values send the InfoWindow down.
正y偏移值会向下发送InfoWindow。