ArcGIS Maps SDK for Kotlin offers a toolkit, ArcGIS Maps SDK for Kotlin Toolkit, that contains composable UI components to help simplify your Android development work. For information on how Android Jetpack Compose works, see Get started with Jetpack Compose.
The GeoView-Compose
module has composable components to display maps and scenes. Most apps that use Android Jetpack Compose will need this module.
MapView
and SceneView
, which are wrappers for the MapView
and SceneView
classes in the Kotlin Maps SDK API.The Toolkit contains other, special-purpose composable components:
The fastest way to get the toolkit into your app is to reference the compiled library (.aar file) from Jfrog, as described below. For instructions on using the toolkit from source code â for example, if you want to customize it â see Developer setup in the toolkit's repo.
Enhancements in 200.8.0 AuthenticatorThe Authenticator
toolkit component now supports Identity-Aware Proxy (IAP) Sign-in and Sign-out. This works out of the box when there's an IapConfiguration
set on the AuthenticatorState.IapConfigurations
property. As part of adding support for IAP several updates were made to the Toolkit Authenticator
which include deprecations and new recommendations:
Deprecated: The Authenticator
composable that uses the onPendingOAuthUserSignIn
lambda.
Authenticator
composable that accepts a onPendingBrowserAuthenticationChallenge: (BrowserAuthenticationChallenge) -> Unit
lambda.BrowserAuthenticationChallenge
is a wrapper around sign-in/out objects such as IapSignIn
, OAuthUserSignIn
, and IapSignOut
. This new parameter is similar to the previous lambda and should be used when launching and receiving IAP/OAuth flows from your own Activity
.Deprecated: OAuthUserSignInActivity
in the AndroidManifest, previously used to handle OAuth redirect URIs.
AuthenticationActivity
, which provides the same functionality and also supports IAP sign-in/sign-out completion.Deprecated: Activity.launchCustomTabs(pendingSignIn: OAuthUserSignIn?)
& AuthenticatorState.completeOAuthSignIn(intent)
Activity.launchCustomTabs(pendingBrowserAuthenticationChallenge)
AuthenticatorState.completeBrowserAuthenticationChallenge(intent)
Deprecated: AuthenticationManager.signOut()
as it does not support IAP sign-out.
AuthenticatorState.signOut()
. If IapCredentials
are present in the credential cache, this will launch a browser page to invalidate the IAP sessionThe AuthenticatorState
now supports managing multiple OAuthUserConfiguration
instances through the new AuthenticatorState.OAuthUserConfigurations
property. This enhancement allows developers to configure multiple OAuth setups more flexibly.
See the Authenticator toolkit component for more details.
Augmented Reality - FlyoverSceneViewThe FlyoverSceneView
component uses augmented reality to render a scene that is navigated by moving the device, providing a more natural navigation experience than a mouse or touch interface. FlyoverSceneView
can be customized to render any location with a variable translationFactor
to control the degree to which device movement affects the movement of the scene camera. See the FlyoverSceneView toolkit component for more details.
WorldScaleSceneView
may now enter a FailedToInitialize
status in WorldScaleTrackingMode.World
if the component is unable to access the device sensor data.WorldScaleSceneView
will now receive a valid mapPoint
in the SingleTapConfirmedEvent
supplied by the onSingleTapConfirmed
callback. This mapPoint
is calculated using the ARCore Depth API. If the Depth API is not supported on a device, it will test against any horizontal or vertical planes detected at the tapped screen coordinate. If no planes are detected, the mapPoint
will be null.WorldScaleSceneView
is running in Geospatial
mode, ARCore uses Google VPS when available. User can now make use of two versions of the checkVpsAvailability()
function (with and without location parameters) available on WorldScaleSceneViewProxy
to query VPS availability.WorldScaleSceneView
now has an onTrackingErrorChanged
parameter which can be used to track transient errors after the WorldScaleSceneView
has been initialized.See the WorldScaleSceneView toolkit component for more details.
Basemap GalleryThe BasemapGallery
toolkit component has been enhanced to allow basemaps that come from a portal item to be marked as 3D basemaps. If the new property BasemapGalleryItem.is3D
is set true
, a "3D" badge is displayed on top of the basemap's thumbnail in the gallery. See the BasemapGallery toolkit component for more details.
New Features:
UtilityAssociationsFormElement
s in the FeatureForm
. This allows users to view a list of UtilityAssociation
s, navigate to associated features, and edit them.FeatureFormState
class to support navigation for associations in UtilityAssociationsFormElement
and associated features. A new overload accepting FeatureFormState
as a parameter has been added.UtilityAssociation
s can be disabled using the isNavigationEnabled: Boolean
parameter, which defaults to true
.onDismiss
parameter allows handling the tap action, and the icon can be hidden by setting showCloseIcon: Boolean
to false
.FeatureForm
, an action bar is displayed at the top of the form with âSaveâ and âDiscardâ buttons. This can be hidden by setting showFormActions: Boolean
to false
. A new onEditingEvent
callback of type FeatureFormEditingEvent
is introduced to listen for save and discard actions.AttachmentsElementColors.tileContainerColor
and AttachmentsElementTypography.tileSupportingTextStyle
.Deprecations:
FeatureForm(featureForm: FeatureForm, ..)
composable introduced in version 200.4.0. This overload does not display UtilityAssociationsFormElements
. Use the overload that accepts FeatureFormState
instead.AttachmentsElementColors.outlineColor
and tileBorderColor
as the element is no longer outlined.See the FeatureForm toolkit component for more details.
OfflineMapAreasThe OfflineMapAreas
composable allows users to take web maps offline. Users can download map areas created ahead-of-time by the web map author, or they can create map areas on-demand by specifying an area of interest and level of detail. Map areas are downloaded to the app's Documents directory and can be used even when the app is completely offline. Users can get information about a map area such as its size and the geographic region it covers. They can also delete a downloaded map area to free up storage space on the device. See the OfflineMapAreas toolkit component for more details.
The OverviewMap
in the geoview-compose
module is a small, secondary MapView
that can be superimposed on a MapView
or SceneView
. Its purpose is to show the current viewpoint of the map or scene in a wider context. The OverviewMap
can use a customized Symbol
to display the visible area or viewpoint center for the larger MapView
or SceneView
. See the OverviewMap toolkit component for more details.
The toolkit has library modules that can be deployed independent of each other in an application. Note that an individual library module can contain one or more composable UI components.
Reference the library from JfrogIf you haven't already, install and set up ArcGIS Maps SDK for Kotlin.
Ensure the Esri public Jfrog Maven repository is in your project's gradle file, https://esri.jfrog.io/artifactory/arcgis
settings.gradle.kts (Project Settings)
Use dark colors for code blocks
1
2
3
4
5
6
7
dependencyResolutionManagement {
repositories {
...
maven { url = uri("https://esri.jfrog.io/artifactory/arcgis") }
...
}
}
From the Android view, open Gradle Scripts > build.gradle.kts (Module: app) and add a dependency for each component of the ArcGIS Maps SDK for Kotlin Toolkit that you will be using.
From the Project tool window, open Gradle Scripts > libs.versions.toml. In the [versions]
section, verify you're using the correct version number for ArcGIS Maps SDK for Kotlin. And in the [libraries]
section, add the library declarations for the following:
geoview-compose
component, which contains the composable functions MapView
and SceneView
.Gradle version catalogs are the standard Android approach to declaring dependency versions. They are preferred over specifying versions numbers in the build.gradle.kts
or listing version numbers in a version.gradle
. In recent releases of Android Studio, the New Project Wizard generates build.gradle.kts
and gradle/libs.versions.toml
files that support this standard.
Gradle version catalogs can also use BOM files to specify a single version number for all artifacts in the BOM. For more details, see Using the BOM
in the README
of the ArcGIS Maps SDK for Kotlin Toolkit.
Expand
Use dark colors for code blocks Copy1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
// ArcGIS Maps for Kotlin - SDK dependency
implementation(libs.arcgis.maps.kotlin)
// Toolkit dependencies
implementation(platform(libs.arcgis.maps.kotlin.toolkit.bom))
implementation(libs.arcgis.maps.kotlin.toolkit.geoview.compose)
implementation(libs.arcgis.maps.kotlin.toolkit.authentication)
The highlights above indicate lines that we are adding to the default build.gradle.kts (Module: app)
and gradle/libs.versions.toml
generated by the Android Studio New Project Wizard.
The first time you build a project, the Gradle build script will automatically download the ArcGIS Maps SDK for Kotlin and its resources to your development machine. Your Android Studio project will then access the Kotlin Maps SDK with no further action on your part.
Build from sourceAlthough not required to do so, you can build the Toolkit components and micro-apps from the source code in the Toolkit repo. See the setup instructions for details.
RequirementsThe following table shows version compatibility.
SDK Version Toolkit Version 200.0.0 none 200.1.0 none 200.2.0 200.2.0 200.3.0 200.3.0 200.4.0 200.4.0 200.5.0 200.5.0 200.6.0 200.6.0 200.7.0 200.7.0 200.8.0 200.8.0 IssuesFind a bug or want to request a new feature enhancement? Please let us know by submitting an issue.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4