Just updated updated to v2.0 and encountering exception when trying to set the spatial reference and extent on map with layers set via data binding. Any suggestions?Exception...{System.Windows.Markup.XamlParseException: Set property 'ESRI.ArcGIS.Client.Map.Extent' threw an exception. [Line: 89 Position: 85] ---> System.NullReferenceException: Object reference not set to an instance of an object. at ESRI.ArcGIS.Client.Map.getSpatialReferenceFromLayers() at ESRI.ArcGIS.Client.Map.get_SpatialReference() at ESRI.ArcGIS.Client.Map.set_Extent(Envelope value) --- End of inner exception stack trace --- at System.Windows.Application.LoadComponent(Object component, Uri resourceLocator) at LJA.Client.RCP.QBMapFull.MapModule.MapView.InitializeComponent() at LJA.Client.RCP.QBMapFull.MapModule.MapView..ctor()}
<esri:Envelope x:Key="InitialExtent" XMax="-10539988" XMin="-10681703" YMax="3541573" YMin="3405056">
<esri:Envelope.SpatialReference>
<esri:SpatialReference WKID="102113"/>
</esri:Envelope.SpatialReference>
</esri:Envelope>
<esri:Map x:Name="TheMap" Layers="{Binding Layers, Mode=OneWay}" Extent="{StaticResource InitialExtent}">
</esri:Map>
On view model...
public LayerCollection Layers
{
get { return _layers ?? (_layers = new LayerCollection()); }
set
{
if (value == _layers) return;
_layers = value;
OnPropertyChanged("Layers");
}
}