I try to identify features only from the wastepit layer. In this example I am adding two layers: wells and wastepit. I am only calling the identify function on the wastepit layer but I still get features if I press on a location for a well? Please see the codepen for live example. How can I do so I am only get the featureInfo from the wastepit layer? I dont understand why I in fact get feature from all (8) layers in the MapService?
wells = L.esri.dynamicMapLayer({
url: url,
layers: [0]
}).addTo(map);
pipe = L.esri.dynamicMapLayer({
url: url,
layers: [4]
}).addTo(map);
wastepit = L.esri.dynamicMapLayer({
url: url,
layers: [5]
}).addTo(map);
function getFeatureInfo(e) {
wastepit.identify()
.on(map)
.at(e.latlng)
.run(function(error, featureCollection){