ArcGIS javascript API setDefinitionExpression returns wrong result set

المشرف العام

Administrator
طاقم الإدارة
New to GIS and ArcGIS.

I am trying to use the javascript API setDefinitionExpression to limit the output of a FeatureLayer on the map; however, the result set returned by the function is incorrect. The function returns only one result set but when I try to run the same query on the either the ArcGIS server or the database server, there are 6 results.

Anyone know why this is the case?

I am using SQL Server 2012 and following is the code I am using:

var layer1 = new FeatureLayer(path + "/arcgis/rest/services/MammalDistributionMapOIMap/MapServer/0", { outFields: ["*"], opacity: 0.5});var speciesID = document.getElementById("speciesID").value;stringquery = "species_id = " + speciesID;layer1.setDefinitionExpression(stringquery);

أكثر...
 
أعلى