Google maps event problem with flex actionscript

Posted by DEH on Stack Overflow See other posts from Stack Overflow or by DEH
Published on 2010-05-12T22:47:46Z Indexed on 2010/05/14 9:54 UTC
Read the original article Hit count: 215

Filed under:
|
|
|

I am able to render a google map on a flex canvas. I create the map using the code below and then place markers on it in the onMapReady method (not shown)

var map:com.google.maps.Map=new com.google.maps.Map();
map.id="map";
map.key="bla bla";
_mapCanvas.addChild(map);
map.addEventListener(MapEvent.MAP_READY,onMapReady);

It all works fine. However, if I remove the map and then set _mapCanvas to null, then run exactly the same code again, the onMapReady event does not fire. It is weird, but once a map has been created and deleted, the onMapReady event never seems to fire again.

Anyone got any ideas?

Thanks.

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about flex