I was having trouble identifying a FeatureLayer taht was created from a featureCollection. I was getting the error "query has one or multiple unsupported parameters". I debugged a little further and noticed in FeatureLayer.js there is a line of code that requires the geometry type for queryFeatures be of type "extent" and since my geometry type was "polygon" it was throwing the error._canDoClientSideQuery: function(a) {
var c = [], b = this._map;
if (!this._isTable && b && !a.text && !(a.where && a.where !== this.getDefinitionExpression() || a.orderByFields && a.orderByFields.length)) {
var d = this._isSnapshot, e = this._isSelOnly, f = a.geometry;
if (f)
if (!e && a.spatialRelationship === K.SPATIAL_REL_INTERSECTS && "extent" === f.type && (d || b.extent.contains(f)))
c.push(1);
else
return;
if (b = a.objectIds)
if (d)
c.push(2);
else {
var f = b.length, l = this._mode,
g = 0, m;
for (m = 0; m < f; m++)
l._getFeature(b) && g++;
if (g === f)
c.push(2);
else
return
}
if (this.timeInfo)
if (a = a.timeExtent, b = this._mapTimeExtent, d)
a && c.push(3);
else if (e) {
if (a)
return
} else if (b)
if (-1 !== h.indexOf(c, 2))
a && c.push(3);
else
return;
else if (0 < c.length)
a && c.push(3);
else if (a)
return;
return 0 < c.length ? c : null
}
}
Why is that? why can I not pass a polygon? Any explanation would be extremely appreciated.Cheers