我想在google maps v3中完全自定义infowindow?我只是想在那里展示一个图像,没有带箭头的白色圆形背景。
v3有可能吗?或任何解决方法?
像这样的东西
答案 0 :(得分:3)
查看this示例的来源 - 完全自定义的信息窗口(使用Google Map API v3)。
我在Google Map API v3群组中找到了这个示例 - “Custom InfoWindow examples” - 以防您需要更多信息
答案 1 :(得分:0)
如果您只需要图像作为标记,那么您就不需要InfoWindow。您可以将自定义图像设置为位置标记。
pin=new google.maps.LatLng(50.00, 50.00);
if(marker) {
marker.setMap(null);
}
var markerIcon = "car.png";
marker=new google.maps.Marker({
position:pin,
zIndexProcess: function( m )
{
return 9999999
},
icon:markerIcon
});
marker.setMap(map);
map.setCenter(marker.getPosition());