Hi,
I have two featureLayers (RegionsLayer and CommunesLayer) so my goal is to get only the communes under a given Region (spatial query), actually I can get a specific region with definitionExpression
const featureLayerRegion = new FeatureLayer({ url: "https://xxxxxxxxxxx/arcgis/rest/services/TEST_SPATIAL/MapServer/3", outFields: ["*"], definitionExpression: "ID_Reg = 1", popupTemplate: templateRegion }); map.add(featureLayerRegion);
and now I want to get all the communes from CommuneLayer that belong to this region ?
Here's the link to the API reference which shows the intersecting of 2 feature layers using geometry engine:
Hi,
Many thanks for your reply, could you please share with me a sample of code it would be very helpful.