AnsweredAssumed Answered

QueryTask outSpatialReference

Question asked by agesriuser on Dec 14, 2012
Latest reply on Jan 10, 2013 by agesriuser
I am working for a client that has a Tiled Basemap in one Spatial Reference (3857) and a Dynamic Map Service Layer in another Spatial Reference (wkt: PROJCS["USA_Contiguous_Albers_Equal_Area_Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Albers"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-96.0],PARAMETER["Standard_Parallel_1",29.5],PARAMETER["Standard_Parallel_2",45.5],PARAMETER["Latitude_Of_Origin",37.5],UNIT["Foot",0.3048]]).

I figured out how to project the Dynamic Map onto the Tiled map but for some reason when I do a QueryTask it doesn't transform the dynamic data into the new projection. I have set the outSpatialReference to 3857 and it doesn't change it. My guess is the well-known text for the dynamic map is keeping it from changing coordinates. I even went into the REST Services and tried a Query from there with the new outSpatialReference and it didn't work. I have included images to explain what I did.

One thing I figured out is that if I use the GeometryService.project() method it will change the coordinates fine, but that is a much more cumbersome solution for the application I am building.

[ATTACH=CONFIG]19943[/ATTACH] [ATTACH=CONFIG]19944[/ATTACH]

Outcomes