AnsweredAssumed Answered

JS API 4.0 layer order in map and resulting maximum scale

Question asked by FluxysIT2 on May 11, 2016

When I add several layers to a Map, the maximum zoom level depends on the order of the layers in the layers array:


var map = new Map({

        /*basemap: "streets",*/

        /*basemap: customBasemap ,*/

        layers: [infraLyr, baseLyr],

        /*layers: [baseLyr, infraLyr],*/

        spatialReference: new SpatialReference ({wkid: 31370})



The baseLyr is a TileLayer and the infraLyr is a MapImageLayer.


When I use the sequence  "layers: [infraLyr, baseLyr]", I can zoom to the maximum scale of the infraLyr and the tiles of the baseLyr are interpolated outside the scale range of the baseLyr.


When I use the sequence "layers: [baseLyr, infraLyr]", I can only zoom to the maximum scale of the baseLyr.


It would be more logical to be able to zoom to the maximum scale of any of the layers present in the map, regardless of their sequence?