Thanks ptrk, that works :) Saxon
On May 14, 7:48 pm, ptrk <[email protected]> wrote: > Hi Saxon, > > the Flex API Map component differs from the one supplied by Flash API, > and what you have seen is the main difference :) You do not normally > addChild() an component onto Flex stage, but you can do so for example > extending a Flex component, like this: > [canvasWithGoogleMap.mxml] > <?xml version="1.0" encoding="utf-8"?> > <mx:Canvas > xmlns:mx="http://www.adobe.com/2006/mxml" > width="100%" height="100%" > creationComplete="init()" > > > <mx:Script> > .... > protected function init():void > { > mapa = new Map; > mapa.key = Mapa.key; > mapa.addEventListener(MapEvent.MAP_READY, > onMapReady); > mapa.setSize(new Point(200,200)); > addChild(mapa); > } > </mx:Script> > </mx:Canvas> > > cheers > > ptrk > > On May 13, 5:40 pm, Saxon <[email protected]> wrote: > > > > > Hi, > > > I'm building an app using the flex SDK, and was using > > map_flex_1_9.swc, with a <maps:Map> control. > > > I then tried to add a second map dynamically using: > > > var map:Map = new Map(); > > ... > > stage.addChild(map); > > > Although something seemed to be happening (eg the MAP_READY event was > > being fired), the map wouldn't appear on the screen. > > > I found that if I removed map_flex_1_9.swc and added map_1_9.swc, then > > my dynamic map would work (although my original <maps:Map> had to be > > removed for it to compile). > > > Is this expected behaviour? > > > Is it 'safe' to use map_1_9.swc with a flex SDK app, as long as I > > don't mind using new Map() for all of my maps instead of <maps:Map>? > > Is the only difference the addition of <maps:Map>, or is there > > something else I might be missing out on? > > > Thanks, > > Saxon- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
