I am trying to create a web app where the user can dynamically create
new map instances at will, each in its own MDI window. Creating my
first map works fine. But after that I get
"Error: Object not initialized
at com.google.maps.wrappers::Wrapper$/checkValid()"
I have gotten this to work fine using Yahoo maps, and "UMap" but I
can't get it to work with google map, and I like google maps best
because it seems to have the most accurate geocoding.
My code is the following
MapTool.mxml - An MDIWindow that contains a UIComponent that wraps a
map
--
<ToolWindow xmlns="tools.*" xmlns:mx="http://www.adobe.com/2006/mxml"
width="600" height="500" xmlns:map="tools.map.*">
<map:GoogleMapUIComponent id="myMap" width="100%" height="100%" />
</ToolWindow>
------------
GoogleMapUIComponent.as - UIComponent wrapper for a map.
public class GoogleMapUIComponent extends UIComponent
{
private var gMap:Map;
public function GoogleMapUIComponent()
{
super();
gMap = new Map();
gMap.key = KEY;
gMap.addEventListener(MapEvent.MAP_READY,onMapReady);
addEventListener(ResizeEvent.RESIZE,resizeMap);
gMap.setSize( new Point (this.width,
this.height));
addChild(gMap);
}
}
-----------------
I have played around with calling code after "creation" and
initialization, etc. and I cannot seem to get the google map to work.
Any ideas would be most helpful.
Thanks,
Jeff
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" 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?hl=en
-~----------~----~----~----~------~----~------~--~---