thank you , i found the solution
On Dec 2, 3:10 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> On Dec 2, 4:27 am, MAlex001 <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Hi, I am populate my map with information coming from a data base.
> > For each element of the DB I create a marker.
> > When I click this marker I want a popup modal window appears.
>
> > That is fine, I register for each of them the event onclick
>
> > for (int i=0; i<listElements.length; i++)
> > {
> > var newIcon = MapIconMaker.createFlatIcon({width: 32, height:
> > 32, primaryColor: "#EDF500",ID:regID});
> > var point = new GLatLng(latitud,longitud);
> > var marker = new GMarker(point,{icon: newIcon},);
> > GEvent.addListener(marker, "click", function() { var modal = $find
> > ('ModalPopupExtender1');
> > modal.show();
> > WebService.FetchOneRegulatorInfo(regID,DisplayData);
> > });
>
> > }
>
> > Information shown in the modal popup depend of the value regID .
> > My problem is that if the last element was having a value 34, when i
> > click any of them, all have 34 as value. Why?
>
> > How can I keep some informacion in each marker that Ican retrieve when
> > i click in the marker?????
>
> Add it to the marker marker.MyRegID = ... or use function closure.
> See Mike Williams' tutorial:http://econym.org.uk/gmap/basic1.htm
> Pitfall #3.
>
> -- Larry- Hide quoted text -
>
> - Show quoted text -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---