AnsweredAssumed Answered

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

Question asked by kammerer1 on May 21, 2015

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!

Outcomes