Skip to content

Sample app

The sample project is a Compose Multiplatform application that exercises the whole wrapper. All of its map code lives in commonMain; the Android and iOS projects only start it.

Running it

The API key comes from local.properties, and the build fails with an explicit message without it.

MAPKIT_API_KEY=<API-KEY>
./gradlew :sample:composeApp:installDebug

Open sample/iosApp/iosApp.xcworkspace in Xcode and run.

BuildKonfig generates the key into common code, which is the pattern described in Quick start.

What is inside

The app opens on a menu of screens, each covering a slice of the API.

Screen What it shows
Old api objects the Controller API — MapControllerEffect plus imperative MapKit code, including clustering
New api objects the States API — Placemark, Circle, Polygon, Polyline, Clustering, composable icons
Layers, listeners and states MapObjectCollection, MapObjectLayer, TileLayer, TrafficLayer, MapListeners, the state objects and traverse
Storage, offline cache, i18n StorageManager, OfflineCacheManager, I18nManager and the MapKit log stream

Every screen keeps an on-screen event log, so a tap, a camera move or a failed call is visible without a debugger — which is also how the wrapper's own behaviour was verified.

It is a rewrite of the official Yandex MapKit demo on top of this library, so the same scenarios can be compared side by side with the original Android code.