I ran into the same issue. I was calling MapType.NORMAL_MAP_TYPE when
I was trying to "setInitOptions" on the map.

The solution was to do that later in the map life cycle: add a
"MapEvent.MAP_PREINITIALIZE" listener, and in that handler, access
MapType. Then it was ok and null access error went away.

If I had done that earlier elsewhere in my flash app (already created
maps with the correct order, accessing MapType), and then try to
access MapType "too early" (eg. even before creating the map object i
intend to use it on), it would still WORK. So probably at
PREINITIALIZE time some library/component gets dynamic loaded once for
the flash app.



On Aug 11, 12:40 pm, Shaun <[email protected]> wrote:
> Possible a difference in the load time between the servers and the timing
> for the mapReady event versus your blueprintAvailable function being fired.
>  I would try making a third method/function here that gets called by your
> blueprintAvailable and by mapReady that checks for both having been called
> before doing this work so in pseudo code something like this:
>
> function bluePrintAvailable():void
> {
> isBluePrintAvailable=true;
> doStuff();}
>
> function mapReadyHandler(event:Event):void
> {
> isMapReady=true;
> doStuff();}
>
> function doStuff():void
> {
> if(!isMapReady || !isBluePrintAvailable)
> return;
> //Do the rest of your code here
>
> }
>
> The behavior still seems strange for just accessing a static variable on a
> class but maybe some of the classes aren't yet loaded until after map ready
> (once it's retrieved some bytecode swf from the server).
>
> Shaun

-- 
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.

Reply via email to