I am trying to load a basemap and one USA layer from USA Service but i am getting an exception and i am not able to find the cause. The exception says like this " System.ArgumentException: Service does not contain a valid tilingscheme at Esri.ArcGISRun

385
0
03-17-2018 10:08 PM
VijitWadhwa
New Contributor III

Please Help me with this i am unable to solve, i am in a lot of trouble .

I am attatching the project below . Please help me as soon as possible

my MainWindow.xaml looks like this

<Window x:Class="ch2b.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"

Title="MainWindow"
Height="600"
Width="800">
<!--<Grid DataContext="{Binding Source={StaticResource Locator},Path=Main}">
<esri:MapView x:Name="MyMapView"
LayerLoaded="MyMapView_LayerLoaded">
<esri:Map>
<esri:ArcGISTiledMapServiceLayer ID="Basemap"
ServiceUri="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
</esri:Map>
</esri:MapView>
</Grid>-->
<Grid DataContext="{Binding Source={StaticResource Locator},Path=Main}">
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>

<esri:MapView x:Name="MyMapView" Grid.Row="0" LayerLoaded="MyMapView_LayerLoaded">
<esri:Map>
<esri:ArcGISTiledMapServiceLayer ID="Basemap" ServiceUri="{Binding Main.BasemapUri,Source={StaticResource Locator}}"/>
<esri:ArcGISDynamicMapServiceLayer ID="USA" ServiceUri="{Binding Main.USAUri,Source={StaticResource Locator}}"/>

</esri:Map>
</esri:MapView>
<TextBlock Name="Search" Background="#77000000" HorizontalAlignment="Center" VerticalAlignment="Top" Padding="5" Foreground="White">
<Run>Search For</Run>
<TextBox Name="SearchTextBox" Text="{Binding SearchText}"></TextBox>
<Run>in the cities, countries or state layer</Run>
<Button Content="Find" Width="30"
Command="{Binding SearchRelayCommand}" CommandParameter="{Binding Path=SpatialReference.Wkid,ElementName=MyMapView}"></Button>
</TextBlock>
<DataGrid Name="MyDataGrid" ItemsSource="{Binding Path=GridDataResults,Mode=TwoWay,UpdateSourceTrigger=PropertyChanged}" AutoGenerateColumns="True" Grid.Row="2" Height="200"></DataGrid>
</Grid>
</Window>

0 Kudos
0 Replies