I am playing with the Yahoo Maps communication tool kit since it has released and I was pretty disappointed on seeing that it doesn’t had the CustomPoiMarkerClick event.
Then I started looking in the code which is relased by yahoo maps as a wrapper to the existing Flex 1.5 API
I have just modified the method in that source and i am posting it here so it might be useful to ppl working on Mashups.
function onPOIClicked(ev:Object) {
var rtnObj:Object = new Object();
var myMarker:Object = ev.marker;
for (var p in myMarker) {
rtnObj[p] = myMarker[p].toString();
}
for (var q in ev){
if (typeof(ev[q]) != ‘movieclip’) {
rtnObj[q] = ev[q];
}
}
EIBuffer.addCall({method:swfDomId + “.onPOIClicked” + id, data:rtnObj});
}
After changing the method in the as2map.fla file which is under source/as2 directory of yahoo library source.
I was able to get all the marker details like ‘title’, ‘description’,'index’ and the usual stuff like latlon information etc.
Hope that helps,
Anupam