Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am using ESRI's Silverlight API to display a map with one dynamic layer. Occasionally (not always), when that layer is initialized, the SpatialReference attribute will be null. I'm not sure why this is, since this map service has a spatial reference set to WKID 102113.

Does anyone know why the SpatialReference would be showing up as null?

share|improve this question
add comment

1 Answer

up vote 4 down vote accepted

Is one layer bigger than your Map Extent?

The following screen shot shows three different Map Controls that have the same layers added to each Map but have dramatically different drawing results because of having different Map.SpatialReference values set. Each Map has its Extent set to approximately to the same geographic area of coverage given the different SpatialReference’s of the layers. The layers being added to each Map Control, in drawing order, are:

ArcGISTiledMapServiceLayer with a SpatialReference WKID = 4326
ArcGISDynamicMapServiceLayer with a SpatialReference WKID = 4269
ArcGISDynamicMapServiceLayer with a SpatialReference WKID = 102113 

Map1 displays all three layers without any problem. The ArcGISTiledMapServiceLayer (1) automatically sets the default Map.SpatialReference (WKID = 4326) value and the other layers (2 and 3) have their SpatialReference re-projected on-the-fly by ArcGIS Server.

Map2 only displays layers 2 and 3 (the ArcGISDynamicMapServiceLayer’s) because the Map.SpatialReference (WKID = 4269) has been set manually to something that is different than what the ArcGISTiledMapServiceLayer.SpatialReference is.

Map3 only displays layers 2 and 3 (the ArcGISDynamicMapServiceLayer’s) because the Map.SpatialReference (WKID = 102113) has been set manually to something that is different than what the ArcGISTiledMapServiceLayer.SpatialReference is.

The screen shot matches the code examples provided in this document.

enter image description here

http://help.arcgis.com/en/webapi/silverlight/apiref/ESRI.ArcGIS.Client~ESRI.ArcGIS.Client.Map~SpatialReference.html

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.