hi,
I currently have a map on my page but when I click on my markers, it
doesn't show any information, how can I can teh click function and
info box?
[code]
<script language="JavaScript" type="text/javascript">
function load() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var locationIcon = new GIcon(G_DEFAULT_ICON);
//both images must be the same size
locationIcon.image = 'images/build/wcgooglepin.png';
locationIcon.printImage = 'images/build/printImage.gif';
locationIcon.mozPrintImage = 'images/build/mozPrintImage.gif';
locationIcon.iconSize = new GSize(28,40);
locationIcon.shadow = 'images/build/shadow.png';
locationIcon.transparent = 'images/build/transparent.png';
locationIcon.shadowSize = new GSize(48,40);
locationIcon.printShadow = 'images/build/printShadow.gif';
locationIcon.iconAnchor = new GPoint(14,40);
locationIcon.infoWindowAnchor = new GPoint(14,0);
locationIcon.imageMap =
[27,0,27,1,27,2,27,3,27,4,27,5,27,6,27,7,27,8,27,9,27,10,27,11,27,12,27,13,27,14,27,15,27,16,27,17,27,18,27,19,27,20,27,21,27,22,27,23,27,24,27,25,27,26,26,27,20,28,20,29,19,30,19,31,18,32,18,33,17,34,17,35,16,36,16,37,15,38,15,39,12,39,12,38,11,37,11,36,10,35,10,34,9,33,9,32,8,31,8,30,7,29,7,28,1,27,0,26,0,25,0,24,0,23,0,22,0,21,0,20,0,19,0,18,0,17,0,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,7,0,6,0,5,0,4,0,3,0,2,0,1,0,0];
markerOptions = { icon:locationIcon };
map.setCenter(new GLatLng(51.219303,-0.270450), 9);
map.addOverlay(new GMarker(new GLatLng(50.819303,-0.370450),
markerOptions)); //BN148BX
map.addOverlay(new GMarker(new
GLatLng(51.5117477823653,-0.13999767609034), markerOptions)); //
W1S3BJ
}
}
</script>
[/code]
thanks
--
You received this message because you are subscribed to the Google Groups
"Google Maps API V2" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-api?hl=en.