Select to view content in your preferred language

Set an Output Spatial Reference for FeatureLayer?

3837
3
03-23-2011 01:30 PM
MichaelLacy
Occasional Contributor
Is there a way to set the Output Spatial Reference for a FeatureLayer that references an ArcGIS map service?  I know the map service supports this, but I don't see a way to do it with the FeatureLayer class.  My base map is using web mercator (102100), but I would like to display layers from a service that is using WGS-84 (4326) by default.  I also thought I might be able to handle the UpdateCompleted event and reproject the graphic geometries individually, but that event doesn't seem to fire in this case.  It looks like if the default spatial reference of the map service is different than that of the map, then it never even attempts to load the layer.

Mike
0 Kudos
3 Replies
JenniferNery
Esri Regular Contributor
This is a good documentation on Map.SpatialReference and layers: http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map~Spatia...

FeatureLayer is one of those that does not require manual re-projection.

OutSpatialReference is not exposed at the FeatureLayer level. It is available in the Query though, if you need it then use GraphicsLayer to hold the Query results instead http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Tasks.Quer....
0 Kudos
MichaelLacy
Occasional Contributor
I am getting old and stupid and should just become a manager.  I had MaximumResolution set in the wrong units (4326 instead of 102100).  The data does display now, without the need for manual reprojection.  Thanks.
0 Kudos
AddisalemAbera1
Emerging Contributor

hello Michael,

how you was able to set Resolution??

0 Kudos