How to zoom to extent of intersected features in ArcGIS JSAPI

1350
1
06-21-2016 08:37 AM
GeoffreyWest
Occasional Contributor III

I have 2 feature point layers which are intersected by a line feature layer.  One point layer is called "feeders", the other is for demo purposes, is called "customers".  The line feature layer connects the feeders and the customers.  I would like to write logic so that when a feeder is clicked the extent of the map is moved to the customers that are intersected with the line features.  How can this be done with ArcGIS JSAPI?  There are approximately 111 feeder features and 400 customers.

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Geoffery,

  Sure that can be done it would just take two spatial queries the first query would use the clicked feeders geometry in a QueryTask to get the intersected line geometry and then you would use that returned line geometry to do a second spatial query on the customers url to get the intersected customer point.

0 Kudos