ESRI JS API 4.4 IdentifyTask with layerOption = "visible" also returns result for invisible layers

380
0
08-29-2017 02:54 AM
janjermei
New Contributor III

The situation can be reproduced in the sandbox https://developers.arcgis.com/javascript/latest/sample-code/sandbox/index.html?sample=tasks-identify

1. change the visibility of parcelsLyr as follows

var parcelsLyr = new TileLayer({
        url: soilURL,
        opacity: 0.85,
        visible: false
      });

2. change the IdentifyParameters as follows:

// Set the parameters for the Identify
        params = new IdentifyParameters();
        params.tolerance = 3;
        params.layerIds = [0, 1, 2];
        params.layerOption = "visible";
        params.width = view.width;
        params.height = view.height;

3. click refresh

4. execute Identify

Result: we get an identify result with soil information, even when this layer is not visible.

Tags (1)
0 Kudos
0 Replies