Initialize Basic Map

This commit is contained in:
PeterZhong 2024-09-23 10:12:13 +08:00
parent dd3c467f9f
commit 14317fea42
3 changed files with 3 additions and 3 deletions

View File

@ -38,7 +38,7 @@ namespace GisDevelop_Exp
// Initialize the ArcGIS Maps SDK runtime before any components are created.
ArcGISRuntimeEnvironment.Initialize(config => config
// .UseLicense("[Your ArcGIS Maps SDK license string]")
// .UseApiKey("[Your ArcGIS location services API key]")
.UseApiKey("AAPTxy8BH1VEsoebNVZXo8HurGPYSDOnAeIwA4pOmn4FxReGCVGizofL_NQAK3uvzuar2NmXR05j3u3x4g02LDdUvuS2vHqxHTPyUTYWgjjqXXiEBKefOwcK-XJXp68tFHTc0f6JAgnPMVNzfluXceV0TzpdU9OfkGsrTPtIAIwBB_jw0BKZT_c6Qa2RCP5J7gZSlOuuebJ4oo488So-4Lh0WrIObQPjmc5wsc7MxoWn6rg.AT1_A4CN5Ivr")
.ConfigureAuthentication(auth => auth
.UseDefaultChallengeHandler() // Use the default authentication dialog
// .UseOAuthAuthorizeHandler(myOauthAuthorizationHandler) // Configure a custom OAuth dialog

View File

@ -11,6 +11,6 @@
<local:MapViewModel x:Key="MapViewModel" />
</Window.Resources>
<Grid>
<esri:MapView Map="{Binding Map, Source={StaticResource MapViewModel}}" />
<esri:MapView x:Name="MainMapView" Map="{Binding Map, Source={StaticResource MapViewModel}}" />
</Grid>
</Window>

View File

@ -27,7 +27,7 @@ namespace GisDevelop_Exp
{
InitialViewpoint = new Viewpoint(new Envelope(-180, -85, 180, 85, SpatialReferences.Wgs84)),
#warning To use ArcGIS location services (including basemaps) specify your API Key access token or require the user to sign in using a valid ArcGIS account.
//Basemap = new Basemap(BasemapStyle.ArcGISStreets)
Basemap = new Basemap(BasemapStyle.ArcGISStreets)
};
}