I have the same pb, I would really prefer not to put the map outside of the template. Why i don't understand is why does it fail loading after one load. Is there anything wrong while i instanciate the map Object? Or is it when i remove the template container with the map inside, from the scene that makes the reload fail. Why can we only load a maps once?
2010/11/28 Cida Fukushima <[email protected]> > ok, I'll try that. > thank you for your help. > > > On Sat, Nov 27, 2010 at 6:36 PM, Daniel <[email protected]> wrote: > >> The onmapready event isn't getting fired so you are only getting the >> default map. Notice how your controls are not there. I would just put the >> map in a container that can move off the visible area of your page so you >> don't have to keep loading the map. >> On Nov 26, 2010 9:53 AM, "Cida" <[email protected]> wrote: >> > Hi, >> > I've tried that too, but when I navigate to another frame the map is >> > still there and >> > if I use removeChild, when I return to frame with the map, it doesn't >> > work either. >> > I have a test online here: >> > http://anadehelios.com/teste/ >> > You can click on "Contato", that's where the map is. >> > In this example it's in an external swf, loading into a Loader in the >> > main file, like the rest of the content from the other sections. >> > thanks for replying! >> > >> > >> > On Nov 26, 3:42 pm, Daniel <[email protected]> wrote: >> >> 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]> >> <google-maps-api-for-flash%[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]<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]<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]<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. > -- Ghazi Ahmed 18, rue Biot 75017 Paris +33661497577 [email protected] [email protected] https://twitter.com/Bounews http://www.nozbone-skateshop.com/ http://www.soixanteseize.com -- 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.
