Insconsistent state of the Map object when I change the basemap (possible bug)

Discussion created by ehtroyas-esri-ireland-ie-esridist on Mar 5, 2014
Hi All!

I think I have discovered a problem in the API related with Map.layerIds and Map.basemapLayerIds.

The problem when I change the basemap with the BaseMapGallery is creating a inconsistent state of the Map object.

This is the problem: when I change the basemap it seams that my map.basemapLayerIds is not updating with the new Id, and is keeping the old id this is creating and inconsistent ids between map.layersIds and map.basemapLayerIds.

Map1.layersIds[0] is ???layer0??? this is the id of the basemap
Map1.baseMapLayerIds[0] is ???layer1??? this as well is the id of the basemap but it should be the same id than map1.layersIds. The id is not updated when we change the basemap.

Thanks for your help!