Android SDK
com.atasumaps:atasu-maps-android on MapLibre Native: map view, language and theme, search, routes to entrances.
On this page
Preview. In the pilot the Android SDK is an internal module used by the Atasu Maps app; publication to Maven Central comes with the Beta. The production style delivery for native maps is still being decided, so outside development builds the map view does not load a style yet. The API below is stable for the pilot.
com.atasumaps:atasu-maps-android (Kotlin package com.atasumaps.sdk) is built on MapLibre Native.
Open source (Apache-2.0). minSdk 26 (Android 8.0).
Install
// app/build.gradle.kts
dependencies {
implementation("com.atasumaps:atasu-maps-android:0.1.0")
}You need a mobile key from the console, restricted to your app's package name (for example
kz.example.taxi). The SDK sends the package name with every request; the API refuses other packages.
Configure once
// Application.onCreate
AtasuMaps.configure(this, apiKey = BuildConfig.ATASU_API_KEY, language = AtasuLanguage.KK, theme = AtasuTheme.AUTO)Keep the key out of source control (for example a Gradle property → BuildConfig). Server keys (atk_srv_…)
are refused: they must never ship in an app.
Show a map
// Jetpack Compose
AtasuMap(Modifier.fillMaxSize()) { map ->
map.maplibre.cameraPosition = CameraPosition.Builder().target(LatLng(43.24313, 76.95692)).zoom(14.0).build()
}
// or a View
AtasuMapView(context).apply { bindTo(lifecycle) }.getMapAsync { map -> /* … */ }The map waits for the first tile token, refreshes it in the background and survives configuration changes. Attribution is drawn on the map: expanded at start, then collapsible to an ⓘ that shows it again; it cannot be hidden.
Language and theme
AtasuMaps.setLanguage(AtasuLanguage.RU) // every map, no style reload
map.setTheme(AtasuTheme.NIGHT) // one map, no style reload
map.addContent("my-layer") { style -> /* style.addSource(…); style.addLayerBelow(…, AtasuMap.firstLabelLayerId(style)) */ }Content added with addContent comes back after every style reload.
Search
Every call returns AtasuResult: Success with the value, or Failure with a typed AtasuError.
val session = AtasuMaps.search.autocompleteSession(viewModelScope) // debounced, one session token per search
session.update("Минина 24", near = LngLat(76.94, 43.24)) // collect session.state for suggestions
val place = session.place(suggestion.id) // ends the session; 410 → AtasuError.PlaceRemoved
when (val r = AtasuMaps.search.search("Минина 24")) {
is AtasuResult.Success -> r.value.forEach { println(it.name) }
is AtasuResult.Failure -> println(r.error)
}val r = AtasuMaps.routing.route(
RouteOptions(RouteWaypoint.Point(here), RouteWaypoint.Entrance(entrance.id), TravelMode.WALKING, alternatives = 1),
)
if (r is AtasuResult.Success) {
RouteLayer(map).show(r.value, selected = 0, destination = entrance.lngLat)
EntranceLayer(map).show(place.entrances, selected = entrance.id)
}TravelMode.DRIVING, TAXI or WALKING; resolvedTo on each waypoint says whether the route really ends at
the entrance.
Errors
AtasuError is Network, PlaceRemoved (410), NotFound, RoutingUnavailable / SearchUnavailable (503,
with retryAfterSeconds), NoRoute, UnresolvableWaypoint, OutsideCoverage, RateLimited, or
Http(status, code) for anything else — see error codes.
Security and privacy
The key and package name go only to api.atasumaps.com, the tile token only to tiles.atasumaps.com
(exact host, https, port 443, also after redirects). The SDK has no analytics, crash reporting or push.