I tried with the sample code available in the arcgis runtime sdk guide, even with the exact files available in github I am only getting a blank main window. The map loads in the designer console but not in the GUI. Please tell me what the problem might be.
To help trouble-shooting could you post the XAML you used, as well as information about which version of the runtime you're using and which platform (WPF/UWP/Xamarin.Android/Xamarin.iOS) etc that you're running on?
I have installed arcgis runtime sdk 100.1.0 over visual studio 2015 in a 32bit PC.
The code is taken from one of the samples available on the arcgis developer guide.
XAML:
<UserControl x:Class="ArcGISRuntime.WPF.Samples.DisplayMap.DisplayMap"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Grid>
<esri:MapView x:Name="MyMapView"/>
</Grid>
</UserControl>
XAML.CS:
using Esri.ArcGISRuntime.Mapping;
using System.IO;
namespace ArcGISRuntime.WPF.Samples.DisplayMap
{
public partial class DisplayMap
{
public DisplayMap()
{
InitializeComponent();
// Create the UI, setup the control references and execute initialization
Initialize();
}
private void Initialize()
{
// Create new Map with basemap
Map myMap = new Map(Basemap.CreateImagery());
// Assign the map to the MapView
MyMapView.Map = myMap;
}
}
One line in my output log saya "Could not open or find PDB file"
for arcgisruntime.dll and Accessibility.dll. I wonder if thst is the real problem.
Code looks ok. You can ignore the PDB warning.
Did you check the load status of the layer you added? Or try loading it manually which would throw the error instead:
await myMap.Basemap.BaseLayers[0].LoadAsync()
I did that. I loaded the layer manually. I get this error now: System.Net.Http.HttpRequestException occured in mscorlib.dll. I think it has something to do with my PC not being connected to the internet but I have to work offline unfortunately. Alternatively, can I use a map available on my local machine? or change the IP settings to local..... Please suggest.