Use the sde scheme functions with arcgis for Server

272
1
Jump to solution
05-08-2017 07:31 AM
SaraEL_MALKI
Occasional Contributor II

Hi guys,

Have you any idea How can I use the geometry functions, as example I wanna substrat all the elements from a Feature Layer (points) that are inside an element from another featureLayer (Polygon) using the arcgis for server and arcgis api for JavavScript ?

https://community.esri.com/community/developers/web-developers/arcgis-api-for-javascript

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
SaraEL_MALKI
Occasional Contributor II

The answer on this question is really obvious , just I did not read the documentation well,

that can be done using "Spatial Relationships" which is a method of the Query object

Query | API Reference | ArcGIS API for JavaScript 3.20 

below is an example, also I have discovered the GeometryEngine

esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.20 

geo=fset.features[0].geometry; //a geometry of a feature
.....
......
var selectionQuery = new esri.tasks.Query();
selectionQuery.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
selectionQuery.geometry = geo;

FLayer2 = map.getLayer("troncon");
FLayer2.queryFeatures(selectionQuery, function(response){ //the feature set Response contains all the elements from FLayers2 intersecting with the geometry "geo"
}

View solution in original post

0 Kudos
1 Reply
SaraEL_MALKI
Occasional Contributor II

The answer on this question is really obvious , just I did not read the documentation well,

that can be done using "Spatial Relationships" which is a method of the Query object

Query | API Reference | ArcGIS API for JavaScript 3.20 

below is an example, also I have discovered the GeometryEngine

esri/geometry/geometryEngine | API Reference | ArcGIS API for JavaScript 3.20 

geo=fset.features[0].geometry; //a geometry of a feature
.....
......
var selectionQuery = new esri.tasks.Query();
selectionQuery.spatialRelationship = esri.tasks.Query.SPATIAL_REL_INTERSECTS;
selectionQuery.geometry = geo;

FLayer2 = map.getLayer("troncon");
FLayer2.queryFeatures(selectionQuery, function(response){ //the feature set Response contains all the elements from FLayers2 intersecting with the geometry "geo"
}
0 Kudos