Hi All,

Was wondering if anyone could help me, Im new to javascript and Jave
been trying to craete a Google Map with 10 markers, which I have done
but I'm trying to add info windows on each marker so when someone
clicks it they get information about that marker.

I know this should be really simple but can't seem to work out how to
do it.

Here is my code.

<script type="text/javascript">
        google.load("maps", "2");

        // Call this function when the page has been loaded
        function initialize() {
                var map = new google.maps.Map2(document.getElementById("map"));
                map.setCenter(new google.maps.LatLng(53, -3), 13);
                map.addControl(new GLargeMapControl());
                map.addControl(new GMapTypeControl());

                // Create our "tiny" marker icon
                var blueIcon = new GIcon(G_DEFAULT_ICON);
                blueIcon.image = "http://uk-golfcourses.com/images/icon.png";;

                // Set up our GMarkerOptions object
                markerOptions = { icon:blueIcon };

                var latlng = new GLatLng(51.72062, -3.436799);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(-32.947842, 151.742905);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.22582, -2.073089);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(-32.914539, 151.745697);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.22582, -2.073089);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.136432, -2.161382);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.136432, -2.161382);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.136432, -2.161382);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.159729, -2.0864);
                map.addOverlay(new GMarker(latlng, markerOptions));

                var latlng = new GLatLng(57.22582, -2.073089);
                map.addOverlay(new GMarker(latlng, markerOptions));


        }
        google.setOnLoadCallback(initialize);
</script>

Any help would be much appreciated.

Regards
Peter

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to