I am currently trying to learn FLEX to improve my web GIS projects,
however I have run into a problem. So far I have successfully managed
to create polygon data from a SQL database, now I am trying to add
infowindow functionality. I have followed the state map demo but am
unsure how to populate the infowindow with the name field from my
database. The function I have tried so far is below. Any help is much
appreciated.

private var p:Polygon;

                        private function onResult(e:ResultEvent):void
                        {
                                var list:ArrayCollection = e.result.map.loc;
                                var arrayObject:Array = new Array();
                                for(var i:int=0; i<list.length; i++)
                                 {
                                arrayObject[i] = new LatLng(list[i].lat, 
list[i].lon);
                                 }
                                p = new Polygon(arrayObject);
                                p.addEventListener(MapMouseEvent.CLICK, function
(e:MapMouseEvent):void
                                {
                                        map.openInfoWindow(event.latLon, new 
InfoWindowOptions({content:
list[i].name}));   //This is the bit I suspect is completely wrong
                                }
                        }

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API For Flash" 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-for-flash?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to