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.g­etTileLayers()[1]];
>
> I am not sure I am describing properly.
>
> Thank You
> Neil

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