Google Groups Home
Help | Sign in
Q: Getting object not initialized error at checkvalid() with multiple maps.
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  2 messages - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
JeffPlummer  
View profile
 More options Oct 7, 7:48 am
From: JeffPlummer <jnyinvestme...@gmail.com>
Date: Mon, 6 Oct 2008 16:48:53 -0700 (PDT)
Local: Tues, Oct 7 2008 7:48 am
Subject: Q: Getting object not initialized error at checkvalid() with multiple maps.
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


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
pamela (Google Employee)  
View profile
 More options Oct 7, 7:53 am
From: "pamela (Google Employee)" <pamela....@gmail.com>
Date: Mon, 6 Oct 2008 16:53:26 -0700 (PDT)
Local: Tues, Oct 7 2008 7:53 am
Subject: Re: Q: Getting object not initialized error at checkvalid() with multiple maps.
Hi Jeff-

Please post in the Maps API for Flash group. There's a link to it from
the posting guidelines for this group. Thanks!

- pamela

On Oct 7, 8:48 am, JeffPlummer <jnyinvestme...@gmail.com> wrote:


    Reply    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google