Why don't you just keep the map in the same .fla as the rest of the project
instead of loading it in from the outside. Is there a reason for you to keep
them separate? Do you have an example of your project online somewhere?

On Fri, Nov 26, 2010 at 2:15 AM, Cida <[email protected]> wrote:

> I have a flash file that loads a swf inside a Loader.
> This loaded swf has a map that works well when it's loaded in the
> first place, the right location shows up.
> However when I navigate to another frame of the flash file and return
> to the section where the swf with the map is loaded, the map that
> shows up from then on is just the world map with no markers or
> controls.
>
> What do I have to do for the map to show up with the correct location
> every time I return to the frame where it's on?
> I have also tried putting all the code in the main timeline, not in a
> loaded swf and the same problem happens when I move to another frame
> and go back to the map.
>
> Can anyone give me a hint of what code I have to use?
>
> thanks
>
> this is my code:
>
> stop();
> //importing classes for Google Maps
> import com.google.maps.LatLng;
> import com.google.maps.Map;
> import com.google.maps.MapEvent;
> import com.google.maps.MapType;
> import com.google.maps.overlays.Marker;
>
> import com.google.maps.controls.NavigationControl;
> import com.google.maps.controls.MapTypeControl;
> import com.google.maps.controls.OverviewMapControl;
>
> var my_map:Map = new Map();
> my_map.key =
>
> "ABQIAAAA1IktfSBhNU8xl5seIsl7HxRddxtj_9g1FWxINIPExNXMnrMOlRQ8YTgIzcPtNjRoht8sVnZbffrEow";
> my_map.sensor = "false";
>
> my_map.setSize(new Point(350, 380));
> my_map.x = 570;
> my_map.y = 15;
> this.addChild(my_map);
>
>
> my_map.addEventListener(MapEvent.MAP_READY, onMapReady);
>
> function onMapReady(event:Event):void
> {
> my_map.setCenter(new LatLng(-16.6957104, -49.2615066), 15,
> MapType.NORMAL_MAP_TYPE);
>
> var my_marker1:Marker = new Marker(new LatLng(-16.6957104,
> -49.2615066));
> my_map.addOverlay(my_marker1);
>
> my_map.addControl(new MapTypeControl());
> my_map.addControl(new OverviewMapControl());
> my_map.addControl(new NavigationControl());
>
> }
>
> --
> 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]<google-maps-api-for-flash%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api-for-flash?hl=en.
>
>

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