This is true, and I see your point. However, I would think that the loading could be spread across several frames. I'm pretty sure what's happening is that all of the loading is happening all at once, which is locking the Flash Player into a single frame until all of the processing is complete. If the loading were to be spread out the application should appear more responsive. All of the loading from the api is getting done when that first Map is added to the stage.
On Oct 23, 12:48 pm, Jonathan Wagner <[email protected]> wrote: > This is less of a Google Maps API issues, and more of flash issue, > flash is single threaded, so if there is a large computational > transaction flash will freeze until the transaction is resolved. If in > your large AIR app you are getting 30 seconds of freezing+, this is > probably something you're doing, as opposed to the Google Maps API. > The freezing with the API is probably being caused when all the tiles > are requested and added for the first time, but there would be no > reason for the freezing of the API to compound with larger apps. > > Jonathan > Scribblemaps.com > > On Oct 19, 11:32 am, Nathan Weber <[email protected]> wrote: > > > When a map is created for the first time, the application freezes > > (accepting no input and displaying no visual changes) until the map is > > fully loaded. This problem seems more pronounced in larger projects > > and especially in AIR projects. I have a project that displays a > > progress bar, but the progress bar freezes (along with the rest of the > > application) while loading a map. > > > Here is a sample application to illustrate the bug: > > When I run this application the progress bar freezes at the 26% mark > > for a few seconds. In a much larger AIR project, loading a map causes > > the application to freeze for around 30 seconds. > > > <?xml version="1.0" encoding="utf-8"?> > > <mx:WindowedApplication > > xmlns:mx="http://www.adobe.com/2006/mxml" > > xmlns:maps = "com.google.maps.*" > > layout="vertical" > > creationComplete="handleCreationComplete(event)"> > > > <mx:Script> > > <![CDATA[ > > import com.google.maps.Map; > > > protected function handleCreationComplete( > > event:Event ):void > > { > > progress.setProgress(0,50); > > > > addEventListener(Event.ENTER_FRAME,onEnterFrame); > > > var timer:Timer = new Timer( 500 ); > > timer.addEventListener( TimerEvent.TIMER, > > loadMap ); > > timer.start(); > > } > > > private function onEnterFrame(event:Event):void > > { > > progress.setProgress( progress.value + 1, > > 50); > > if ( progress.value >= 50 ) > > { > > > > removeEventListener(Event.ENTER_FRAME,onEnterFrame); > > } > > } > > > protected function loadMap(obj:*=null):void > > { > > var map:Map = new Map(); > > map.url = "your url"; > > map.key = "your key"; > > map.width = 500; > > map.height = 500; > > map.setStyle( 'verticalCenter', 0 ); > > map.setStyle( 'horizontalCenter', 0 ); > > > addChild( map ); > > } > > ]]> > > </mx:Script> > > > <mx:ProgressBar visible="true" id="progress" mode="manual" > > width="300" top="10" horizontalCenter="0" fontWeight="normal"/> > > > </mx:WindowedApplication> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
