Greetings,
I'm trying to write a disjoint query to get an indication of which features are outside of the mapView's extent. I've structured the query but it appears that the spatial relationship "disjoint" produces the same results as using "intersect".
var deleteQuery = fl.createQuery();
deleteQuery.geometry = webMercatorUtils.webMercatorToGeographic(mapExtent);
deleteQuery.spatialRelationship = "disjoint";
deleteQuery.returnGeometry = false;
deleteQuery.outFields = [ "OBJECTID" ];
fl.queryFeatures().then(function(disjointResults){
fl.applyEdits({deleteFeatures:disjointResults.features})
.then(function(delResults) {
fl.queryFeatureCount().then(function(count){
console.log('AFTER delete fl feature Count: ' + count)
})
})
})
Not sure what I am doing wrong. Does anyone see any glaring mistakes?
I logged my query to JSON and thought the '"where":"1=1"' part looked odd since I didn't specify a where property.
{"geometry":{"spatialReference":{"wkid":4326},"xmin":-78.78690645507774,"ymin":35.78811526137758,"xmax":-78.77317354491959,"ymax":35.79110471050848},"outFields":["OBJECTID"],"returnGeometry":false,"spatialRel":"disjoint","where":"1=1"}
Any ideas will be greatly appreciated.
Thanks, Tyler