thanks, for posting your solution

the problem has something to do with
"Flash Sandbox issue encountered in PV3D"
its mentioned here :
http://professionalpapervision.wordpress.com/2009/04/18/putting-3d-google-maps-on-the-web-using-flash-10/
(but i can't find the "previous post"on that site)

gr
mels le noble
www.melslenoble.nl

On May 24, 10:07 pm, mlecho <[email protected]> wrote:
> ok...for anyone who cares and finds this...here is how i did it. For
> God knows why, i had to add an instance of this to the main stage or
> else gMap would not initialize. Once i knew we were good, i added it
> to papervision and removed the original.
>
> also, i had to add a rectangle, and make the moviematerial precise.
> I'll take it...many hours wasted to get here.
>
> private function _startMap() : void
>                 {
>                         mc = newGoogleMap();
>                         MapLab.instance.addChild(mc)//add to main stage
>                         make3D();
>                 }
>
>                 private function make3D() : void
>                 {
>
>                         var mm:MovieMaterial = new  
> MovieMaterial(mc,false,true,true,new
> Rectangle(0,0,mapWidth,mapHeight));
>                         mm.doubleSided = false
>                         mm.interactive= true;
>                         mm.animated = true
>                         //mm.allowAutoResize = false;
>
>                         var lt:Object = MapLab.instance.light;
>                         var gm:GouraudMaterial = new GouraudMaterial
> (lt.light,lt.color,lt.ambient);
>                         gm.doubleSided = false;
>                         var mList:MaterialsList = new MaterialsList()
>                         mList.addMaterial(gm,'all')
>                         mList.addMaterial(mm,'back')
>
>                         var c:Cube = new 
> Cube(mList,this.mapWidth,10,mapHeight)
>                         addChild(c)
>
>                 }
>
>                 private function newGoogleMap() : MovieClip
>                 {
>                         mc = new MovieClip();
>                         map = new Map();
>                         map.key = String(MapLab.instance.googleKey);
>                         map.setSize(new Point(mapWidth,mapHeight));
>                         
> map.addEventListener(MapEvent.MAP_PREINITIALIZE,preset)
>                         map.addEventListener(MapEvent.MAP_READY, onMapReady);
>                         mc.addChild(map);
>                         return mc;
>                 }
> private function onMapReady(event:MapEvent):void
>                 {
>                         map.setCenter(new LatLng(_lattitude, _longitude), 
> this.zoom,
> MapType.SATELLITE_MAP_TYPE);
>                         MapLab.instance.removeChild(mc)//remove now that it 
> is not needed
>                 }
>
> On May 24, 9:20 am, mlecho <[email protected]> wrote:
>
>
>
> > still no takers?
>
> > On May 23, 3:29 pm, mlecho <[email protected]> wrote:
>
> > > ok, i give up. I thought this would be as simple as placing a map into
> > > a  movieclip, and then mamking that clip a MovieMaterial for a
> > > papervision primitive. However, it seems that the maps will not
> > > intiate until they are on "stage" proper. Or for whatever reason, i
> > > can not get the map to display unless i place it direct onto the
> > > stage, which then makes the asset useless for papervision. Anyone have
> > > experience getting a map into a papervision prmitive WITHOUT using
> > > Flex. I have seen a few tuts on working with Flex, but i am not going
> > > that direction.
> > > Here's what i tried
>
> > > mc = new MovieClip();
>
> > >                         var g:Graphics = mc.graphics;
> > >                         g.beginFill(0xcccccc,1)
> > >                         g.drawRect(0,0,this.mapWidth,this.mapHeight)
> > >                         g.endFill();
>
> > >                         map = new Map();
> > >                         map.key = String(MapLab.instance.googleKey);
> > >                         map.setSize(new Point(mapWidth,mapHeight));
>
> > >                         map.addEventListener(MapEvent.MAP_READY, 
> > > onMapReady);
> > > mc.addChild(map);
>
> > > var mm:MovieMaterial = new  MovieMaterial(mc,true);
> > >                         mm.doubleSided = true
> > >                         mm.interactive= true;
>
> > >                         var lt:Object = MapLab.instance.light;
> > >                         var gm:GouraudMaterial = new GouraudMaterial
> > > (lt.light,lt.color,lt.ambient);
> > >                         gm.doubleSided = false;
> > >                         var mList:MaterialsList = new MaterialsList()
> > >                         mList.addMaterial(gm,'all')
> > >                         mList.addMaterial(mm,'front')
>
> > >                         var c:Cube = new 
> > > Cube(mList,this.mapWidth,10,mapHeight)
> > >                         addChild(c)//add to the DisplayObject3D class we 
> > > are working in- 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to