Hi Pamela,

Thank you for the reply.

Currently we are using map_onready event. According to your
explanation we replaced the map_onready with the map_preinitialize
event. Event with this event is also  we are facing the same problem
(Object not initialized). We are initializing the Google MAP on
actionscript side.

Our application is in such a way that, there is  a will be a "MENU"
with different options after the user login. In this, we are providing
the google MAP's on two different menu options. When ever the user
clicks on any one of the menu option we are going to inline a  canvas.
With in that canvas, we taken a UIComponent for showing the google
MAP. The code for the UIComponent is as follows,
<mx:Canvas label="GoogleMaps" show="onGmapLoad()"  width="100%"
height="100%"  id="google" backgroundColor="#ffffff" paddingLeft="10"
paddingTop="0" x="0" y="0" verticalScrollPolicy="off"
horizontalScrollPolicy="off">
    <mx:UIComponent id="mapContainer" width="100%" height="100%"/>
</mx:Canvas>

On the actionscript side the code is as follows,
googleMap = new Map();
googleMap.key = "key";
googleMap.addEventListener(MapEvent.MAP_READY, googleMap_mapReady);
googleMap.setSize(new Point(trackingForm.mapContainer.width,
trackingForm.mapContainer.height));
googleMap.addControl(new ZoomControl());
googleMap.addControl(new MapTypeControl());
googleMap.addControl(new PositionControl());
formName.mapContainer.addChild(googleMap);

private function googleMap_mapReady(evt:MapEvent):void
{
        mr = new MarkerManager(googleMap,{});
        // We are adding the markers once the map is loaded, by providing
latitude and longitude
}

We are following the same approach or code for the other menu option
with the different functionality. Here, when one of the menu option
with the Google MAP loaded and when we navigate to the other menu
option, an exception is throwing saying that Object is not
initialized. We checked the google map is by printing alert, it is
showing that object is available. But google MAP is not adding to the
corresponding canvas.

We replaced the actionscript code by using the same in flex code
itself as provided in the examples. With that also we are facing the
same problem.

Can you please provide any solution for this.

Regards,
Ravi Kishore



On Mar 1, 2:02 am, pamela fox <[email protected]> wrote:
> Hi Ravi-
>
> From your description and lack of a link/source, I'm not sure what the issue 
> is.
>
> You might try to set the location via the map_preinitialize event
> instead of the map_onready event - maybe that will 
> help.http://code.google.com/apis/maps/documentation/flash/basics.html#MapO...
>
> - pamela
>
> On Fri, Feb 27, 2009 at 10:12 PM, Ravi Kishore <[email protected]> wrote:
>
> > Hi All,
>
> > We have a problem with google map initialization. In FLEX application,
> > on two different locations we are displaying a Google Map. But here
> > the problem is, if one of the Google MAP is loaded and when we
> > navigate the application to see the other Google MAP, it is not
> > initializing. If one of the MAP is loaded the other one is not loading
> > and vice versa.
>
> > Can you please provide the solution for how to overcome this case.
>
> > Waiting for quick reply.
>
> > Regards,
> > Ravi Kishore
--~--~---------~--~----~------------~-------~--~----~
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