Hi,
I have the following function. Points are added correctly on the map
but description
is taken as a last element from the array and assigned to all points
on the map.
You can see demo here:
http://hotele.harpagon.pl/
Just write city in search box and it will find hotels in this city [in
they are exist]. Try with Olsztyn as a demo.

// latt - this is array of latitude values
//lngg - this is array of longtitue values
// opis - array of descriptions
// ilosc - quantity of elements is in array,
// lat - value for setting center
// lng - value for setting center


function NewMap(latt, lngg, opis, ilosc, lat, lng) {

        map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(lat, lng), 13);

        var redIcon2 = new GIcon(baseIcon);
        redIcon2.image = "http://hotele.harpagon.pl/images/marker.png";;
        redIcon2.iconAnchor = new GPoint(0, 0);
    redIcon2.infoWindowAnchor = new GPoint(0, 0 );
                // Set up our GMarkerOptions object

        for (x= 0; x <= ilosc; x++ ) {

                var point = new GLatLng(latt[x], lngg[x]);
                marker = new GMarker(point,  redIcon2);
                opisik = opis[x];

        GEvent.addListener(marker, 'click', function(){
          marker.openExtInfoWindow(
          map,
          "simple_example_window",
          opisik,
          {beakOffset: 3}
        );
        });
                map.addOverlay(marker);
        }

}

--~--~---------~--~----~------------~-------~--~----~
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