Introduction
When it comes to map apps on mobile, many people might think of Google Maps, Apple Maps, or Yahoo! Maps. ArcGIS is often associated with desktop products and may not be commonly thought of for mobile use, but by using ArcGIS Maps SDK for Kotlin, you can develop map apps for Android. ArcGIS adopts Kotlin as the development language for Android apps and uses Jetpack Compose for the UI.Jetpack Compose is the latest toolkit that allows you to declaratively build native Android UIs.
In this article, we will first introduce GeoView-Compose, which is essential for displaying maps, and then cover several key toolkits.
Some of the images and videos included in this article use the publicly available item on Living Atlas called "Ezo Deer Information Map (Forestry Agency Hokkaido Regional Forest Office)".
GeoView
GeoView Toolkit provides composable UI components for MapView and SceneView. By using MapView or SceneView, you can display the maps or scenes you have created on the screen.
Compass
Compass Toolkit provides a composable UI component to display a compass on the map.
Scalebar
Scalebar Toolkit allows you to display a scale bar on the map. You can switch between imperial and metric units and customize colors and sizes.
GeoView,Compass,Scalebar combined screen example is shown in the following image.
Legend
Legend Toolkit provides a composable UI component to display legends on the map. The legend and symbols dynamically change according to the layers visible in the current extent. Adjusting layer settings referenced on ArcGIS Online beforehand makes the legend easier to read.
Supplementary Information- Setting display scale in ArcGIS Online
- ArcGIS Online or ArcGIS Location Platform Feature Layer Map Viewer
- Click the target layer to open properties
- Adjust the slider under visible range in properties
- For each configured layer, click [Save] from [...] to save changes
BasemapGallery
BasemapGallery Toolkit provides a composable UI component that displays available basemaps in a grid format. Typically, BasemapGalleryItem is created based on basemaps set in your ArcGIS organization and passed to BasemapGallery for use.
OfflineMapAreas
OfflineMapAreas Toolkit provides a composable UI component that downloads offline areas set in web maps so that maps can be used offline. If offline areas are preconfigured in web maps on ArcGIS Online or ArcGIS Location Platform, the toolkit reads them and makes them available as offline maps.