QueryTask result features set to wrong projection system

5704
20
11-19-2014 09:09 PM
SadanandacharB1
New Contributor III

Hi All,

I am getting QueryTask result features in wrong projection system,

1. Task : Migrating of Arcgis server from 10.0 to 10.2.1

2. Development: Silverlight application version 5.0

3. All original map service layers render in correct location in the Map control.

4. But after the using Query task on route event layer, the result objects are set to wrong projection system, it pans to the coast of Africa near Nigeria, when i check the WKID for result features it is set to 102100.

I have also set outSpatialReference [source from map] on query result features no use,

Any one can please help on this...

Thanks

Sadanand

0 Kudos
20 Replies
JamesWallace2
New Contributor II

I am having the exact same issue.  Just using esri sample data.  I am creating a query using the Naperville sample data Layer: Water System Valves (ID: 15)  My query results are displaying in Africa, when I use the streets basemap in my application.  If I don't use a basemap in my application the query displays the graphics in the correct location, at least in relation to the rest of the feature layers.  This is the query object:

 var query = new Query();
query.returnGeometry = true;
query.outFields = ["*"];
query.outSpatialReference = map.spatialReference;

I'm pretty sure this is a projection issue, so I have been changing the outSpatial Reference in the query.  this doesn't seem to help. Any help will be appreciated please let me know if any clarification is needed.

0 Kudos