0

So i am trying to get a workaround solution on the problem of mobile mapquest not supporting infowindows with flex components. i managed to create a custom handler for the pois. however i cant figure out how to detect which poi was clicked. all the pois are stored in a shapecollection and i would like to be able to detect which was clicked in order to push its data to another view. any ideas?

ketan
  • 19,129
  • 42
  • 60
  • 98
leokan
  • 662
  • 5
  • 22

1 Answers1

0

after a few days researching and trying different methods i found the solution within the flex itshelf. So here is my solution and I hope that more people can use this to their mobile apps.

 var p: Poi = new Poi(myLatLng);
 p.key = "myKey";
 p.addEventListener(MouseEvent.CLICK,this.onPoiClick);


private function onPoiClick(e:MouseEvent):void {
    var poi: Poi = e.currentTarget as Poi;

   trace("The Poi's key is: " + poi.key);
}

Special thanks to the mapquest forums for helping out

leokan
  • 662
  • 5
  • 22