coords01

FeatureLayer - geometries from QueryTask overlay in different location than source

Discussion created by coords01 on Jun 18, 2010
Latest reply on Jun 22, 2010 by coords01
Originally posted to Silverlight API Forum. http://forums.arcgis.com/threads/5975-FeatureLayer-geometries-from-QueryTask-overlay-in-different-location-than-source?p=19779&posted=1#post19779

Referred here as issue appears not to be API related.

I have a map defined with four layers in this order: TiledBaseMap (ArcMapTiledMapServiceLayer), Sample Locations (FeatureLayer), MyGraphicsLayer (GraphicsLayer), and MySelectionGraphicsLayer (GraphicsLayer). The TiledBaseMap service WKID is 3735. The Sample Locations service WKID is 3734.

I am executing a QueryTask against Sample Locations passing in a Geometry object with SpatialReference WKID=3735. When the call to QueryTask.ExecuteAsync returns the features in the QueryEventArgs.FeatureSet specify that their SpatialReference WKID=3735. However, when I add these features to MyGraphicsLayer they do not overlay with the features from Sample Locations.

I have tried specifying QueryTask.OutSpatialReference as 3735 (though this should be the default according to my understanding) and 3734 - and even though the features in the featureset report the WKID I specify, the actual coordinates are the same.

I have tried setting MyGraphicsLayer.SpatialReference to 3735 and 3734 in combination with the QueryTask OutSpatialReference with no change in the overlay.

I have duplicated this issue directly with the REST interface as follows:

query geometry inSR 3735 - outSR 3734

http://www.coordinatesolutions.com/ArcGIS/rest/services/SampleLoc3734/MapServer/0/query?text=&geometry=1964929.07826553%2C1002333.29662078%2C1965721.17895998%2C1002919.23412078%0D%0A&geometryType=esriGeometryEnvelope&inSR=3735&spatialRel=esriSpatialRelIntersects&where=&returnGeometry=true&outSR=3734&outFields=&f=html

MiR0051
Point:
X: 1965181.74994861
Y: 395641.406268179

query geometry inSR 3735 - outSR 3735

http://www.coordinatesolutions.com/ArcGIS/rest/services/SampleLoc3734/MapServer/0/query?text=&geometry=1964929.07826553%2C1002333.29662078%2C1965721.17895998%2C1002919.23412078%0D%0A&geometryType=esriGeometryEnvelope&inSR=3735&spatialRel=esriSpatialRelIntersects&where=&returnGeometry=true&outSR=3735&outFields=&f=html

MiR0051
Point:
X: 1965181.75005963
Y: 395641.406089559

query no geometry outsr 3734

http://www.coordinatesolutions.com/ArcGIS/rest/services/SampleLoc3734/MapServer/0/query?text=MiR0051&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&where=&returnGeometry=true&outSR=3734&outFields=&f=html

MiR0051
Point:
X: 1965181.74994861
Y: 395641.406268179

query no geometry outsr 3735

http://www.coordinatesolutions.com/ArcGIS/rest/services/SampleLoc3734/MapServer/0/query?text=MiR0051&geometry=&geometryType=esriGeometryEnvelope&inSR=&spatialRel=esriSpatialRelIntersects&where=&returnGeometry=true&outSR=3735&outFields=&f=html

MiR0051
Point:
X: 1965180.86160997
Y: 1002668.97155955

Any help would be much appreciated.

Outcomes