Esri.ArcGISRuntime.Maui
Contains APIs and UI controls for building desktop, mobile, and tablet applications with the cross-platform .NET MAUI (Multi-platform App UI) framework.
- MapView control: used for the display of map layers and information in 2D. It controls the area (extent) of the map that is visible and supports user interactions such as pan and zoom.
- SceneView control: used for the display of 2D layers and 3D scene layers and information in 3D. It uses a camera to control the visible area (extent) of the scene and supports user interactions such as pan, zoom, tilt, and rotate.
Supported application types:
- Windows
- Android
- iOS
- macOS
To create a cross-platform app using ArcGIS Maps SDK for .NET, add a reference to Esri.ArcGISRuntime.Maui
to your application projects:
<PackageReference Include="Esri.ArcGISRuntime.Maui" Version="200.6.0" />
Register the .NET MAUI handlers
In order to use ArcGIS Maps SDK for .NET in a .NET MAUI app, declare using Esri.ArcGISRuntime.Maui
and then call UseArcGISRuntime()
on the MauiAppBuilder
class when your app initializes. You can optionally include configuration to provide things like an API key, license string, or an authentication handler. Apps created from the ArcGIS Maps SDK .NET MAUI App template include this code in MauiProgram.cs.
For example:
// MauiProgram.cs
// Register namespaces to get access to builder extension methods:
using Esri.ArcGISRuntime.Maui;
using Esri.ArcGISRuntime.Security;
// ...
public static class MauiProgram
{
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
builder
.UseMauiApp<App>()
.ConfigureFonts(fonts =>
{
fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
fonts.AddFont("OpenSans-Semibold.ttf", "OpenSansSemibold");
})
// Register the maps sdk and configure optional settings
.UseArcGISRuntime(config => config
.UseLicense("[Your ArcGIS Maps SDK license string]")
.UseApiKey("[Your ArcGIS location services API key]")
.ConfigureAuthentication(auth => auth
.UseDefaultChallengeHandler() // Use the default authentication dialog
)
);
return builder.Build();
}
}