Hi team we are referring this simple map display sample:
https://developers.arcgis.com/net/forms/sample-code/display-map/
We created a blank solution and added the following code:
MainPage.xaml ==Start==
<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:esri="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms"
x:Class="LicenseIssue.MainPage">
<StackLayout>
<Grid>
<esri:MapView x:Name="GMyMapView"/>
</Grid>
</StackLayout>
</ContentPage>
MainPage.xaml ==End==
MainPage.xaml.cs ==Start==
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Esri.ArcGISRuntime.Mapping;
using Xamarin.Forms;
namespace LicenseIssue
{
public partial class MainPage : ContentPage
{
public MainPage()
{
var a = new Esri.ArcGISRuntime.Xamarin.Forms.MapView();
//InitializeComponent();
InitializeComponent();
// Create the UI, setup the control references and execute initialization
Initialize();
}
private void Initialize()
{
// Create new Map with basemap
Map myMap = new Map(BasemapStyle.ArcGISImageryStandard);
// Assign the map to the MapView
GMyMapView.Map = myMap;
}
}
}
MainPage.xaml.cs ==End==
Attached screenshot of the blank app loading
Any help would be appreciated
Did you set the ApiKey? The basemap you're using requires that to be set.
https://developers.arcgis.com/documentation/mapping-apis-and-services/security/#api-keyshttps://deve...
Otherwise try Basemap.CreateImagery() which uses a non-metered service.