Using a Polyline feature instead of a Point for Feature layer query multiple sample

2561
0
05-21-2015 02:20 PM
RyanKammerer1
New Contributor III

I'm trying to get the code right for a Polyline feature service of road segments with a related table of inspection history. I've been playing around with the example: Feature layer query multiple | ArcGIS API for JavaScript , but haven't got it to work for a Polyline feature rather than points. I believe the code the is giving me trouble is:

 

function findWells(evt) {
        grid
.setStore(null);
       
var selectionQuery = new esri.tasks.Query();
       
var tol = map.extent.getWidth()/map.width * 5;
       
var x = evt.mapPoint.x;
       
var y = evt.mapPoint.y;
       
var queryExtent = new esri.geometry.Extent(x-tol,y-tol,x+tol,y+tol,evt.mapPoint.spatialReference);
        selectionQuery
.geometry = queryExtent;
        wellFeatureLayer
.selectFeatures(selectionQuery,esri.layers.FeatureLayer.SELECTION_NEW);
     
}

 

Any ideas on how to write this function for a polyline?

 

Thanks!

0 Kudos
0 Replies