views:

113

answers:

0

Hello,

I have a Flex 3.5 Air Application; The main window has, besides the header, a TabNavigator. In a Tab, I've put a Google Maps object. It works fine, except that it "loads" very slow and the whole application freezes ( not responding problem ).

Now I would like to fix that but don't really now how to implement one of these solutions: 1) Load the API before the whole application loads. 2) Load the API somehow async, when the tab is clicked. I don't really need a fancy preloader, it's enough that my app doesn't freeze.

Please note that I'm "110%" sure that it's the GoogleMaps's fault since the tab canvas is empty, and no other code is there [double checked that]. Also please note that the map only loads, then I call the setCenter method, so no other operations that could freeze it.

EDIT: I managed to determine that not the Api Object creation is slow, but the actual display of it on the GUI. Here's the line of code. ResellersMapClass only extends the Google Maps API class since I intend to add there extra functionality. But right now is clean.

this.map = new ResellersMapClass();
//between here
this.mapContainer.addChild( this.map  );
//and here

Now is there a way to preload this ? Or any other solution that will prevent the GUI from freezing.

Thanks, Gabriel