With your suggestion I coded the following lines and when I compiled and
run that the mapTypeControl dissapeared. In my code tileLayers array is
named as SAVIHybridLayers
//SAVI layers with goole layers
var satMapType:IMapType = MapType.HYBRID_MAP_TYPE;
var SAVIHybridLayers:Array=satMapType.getTileLayers().concat([]);
SAVIHybridLayers.push(new SAVITileLayer(id, cs, br,fg,ss));
SAVIHybridLayers.push(MapType.NORMAL_MAP_TYPE.getTileLayers());
SAVIHybridMapType = new MapType(SAVIHybridLayers,
satMapType.getProjection(),
"SAVI");
map.addMapType(SAVIHybridMapType);
map.setMapType(SAVIHybridMapType);
map.addControl(new MapTypeControl());
Thank you
On Wed, Sep 17, 2008 at 11:37 AM, gudujarlson <[EMAIL PROTECTED]> wrote:
>
> Assuming both the layers are contained in the tileLayers array in my
> example, then all you need to do is create a new array and insert the
> layers in the order of your choosing. If that does not answer your
> question, perhaps you could ask a more specific question.
>
> On Sep 16, 2:23 pm, "Neil Devadasan" <[EMAIL PROTECTED]> wrote:
> > Indeed I could go that far with the demos from map api page. But what I
> am
> > trying to do is to sandwich the custom tile layer in between the areal
> > photos and road layer. similar to the attached image. (Which is based on
> > javascript API).
> >
> > The application I am working on can be viewed athttp://
> 134.68.246.114/SAVIAOIUI/flashsavi.htm
> >
> > Thank you
> >
> > Neil
> >
> >
> >
> > On Tue, Sep 16, 2008 at 2:44 PM, gudujarlson <[EMAIL PROTECTED]>
> wrote:
> >
> > > My guess is that concat([1]) returns a new instance of the array
> > > rather than appending to the existing array.
> >
> > > The only way I have found to add/remove a tile layer is to create a
> > > new map type and make it the current map type, something like this:
> >
> > > var tileLayers:Array = MapType.NORMAL_MAP_TYPE.getTileLayers();
> > > tileLayers.push(new MyTileLayer(getUrlToService(),
> > > compareCoverageList1.selectedItem.data, 0x0000FF));
> > > var myMapType:IMapType = new MapType(tileLayers,
> > > MapType.NORMAL_MAP_TYPE.getProjection(), "My Map Type", new
> > > MapTypeOptions({maxResolution: 12, minResolution: 0}));
> > > map.addMapType(myMapType);
> > > map.setMapType(myMapType);
> >
> > > On Sep 16, 10:53 am, "Neil Devadasan" <[EMAIL PROTECTED]> wrote:
> > > > Pamela, Hi
> >
> > > > The flash code which does not respond. It compiles fine but it wont
> add
> > > > maptype control to map
> >
> > > > var satMapType:IMapType = MapType.HYBRID_MAP_TYPE;
> > > > var SAVIHybridLayers:Array=satMapType.getTileLayers().concat([1]);
> > > > SAVIHybridLayers.push(new SAVITileLayer(id, cs, br,fg,ss));
> >
> > > > The equvalanet JS code: which works
> >
> > >
> varlayer2=[G_HYBRID_MAP.getTileLayers()[0],saviVullayerTrans,G_HYBRID_MAP.getTileLayers()[1]];
> >
> > > > I am not sure I am describing properly.
> >
> > > > Thank You
> > > > Neil
> >
> >
> >
> > savi.PNG
> > 151KViewDownload- 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
-~----------~----~----~----~------~----~------~--~---