AnsweredAssumed Answered

query against features from imported shapefile

Question asked by lkoumis on Feb 9, 2016
Latest reply on Feb 10, 2016 by lkoumis

i use the addshapefile widget to add a widget to the map and then I tried to run a query to capture features of the shapefile that intercept the buffer around a line segment. However I get the message:

"FeatureLayer::selectFeatures - query contains one or more unsupported parameters".

Can the feature layer from the shapefile be used for query?

Thank you.

 

myfeaturelayer is the feature layer from the shapefile created from:

arrayUtils.forEach(featureCollection.layers, lang.hitch(this, function (layer) {
        var infoTemplate = new InfoTemplate("Details", "${*}");
        var featureLayer = new FeatureLayer(layer, {
          infoTemplate: infoTemplate
        });

 

 

Buffer Widget:

The resultEvent is the geometry of a line

 

var myquery = new Query();
  myquery.geometry = resultEvent;
  myquery.returnGeometry = true;
  myquery.outFields = ["*"];
  myquery.outSpatialReference = this.map.spatialReference;
  myquery.spatialRelationship = Query.SPATIAL_REL_INTERSECTS;
  this.myfeatureLayer.selectFeatures(myquery,FeatureLayer.SELECTION_NEW);

Outcomes