Re: Not working
(1) Your values for .iconAnchor are incorrect. This is what's causing
your icons to change position as the zoom level changes.
icon1.iconAnchor = new GPoint(-93.68260860443115,42.016938790641426);
(2) You are failing to set a value for .infoWindowAnchor
This is probably causing the info window to not appear in the viewport.
Since your custom icons are the same shape as the default icon, you can
make a quick fix by doing this:
var icon1 = new GIcon(G_DEFAULT_ICON);
icon1.image='http://www.regencyhomes.com/images/markers/marker1.png';
Which will copy all the properties of the default icon and then only
change the image.
More information about setting GIcon parameters can be found at
http://googlemapsapi.blogspot.com/2005/11/happy-turkey-day.html
and
http://www.econym.demon.co.uk/googlemaps/custom.htm
--
The Blackpool Community Church Google Map API Tutorial
http://www.econym.demon.co.uk/googlemaps/
0 Comments:
Yorum Gönder
<< Home