Docs / Setup / Android / Longdo

Longdo setup

How to drive the Longdo Map API3 SDK through MapConductor. Longdo is the strong choice for Thailand, and ships from its own Maven repository.

MODULE
com.mapconductor:for-longdo
API KEY
Required
VIEW
LongdoMapView
TIME
15 min
Same provider, other platformsiOSReact

Before you start

An Android development environment (Android Studio)
An API key issued in the Longdo Map console
STEP 01

Get an API key

Issue a key in the Longdo Map console. The SDK sends your application's package name for validation, so the key must be registered against that exact package name.

STEP 02

Add the Longdo repository

settings.gradle.ktsKotlin
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()

        // Longdo Map API3 SDK repository
        maven {
            url = uri("https://maven.longdo.com/artifactory/libs-release-public")
        }
    }
}
STEP 03

Add the dependencies

app/build.gradle.ktsKotlin
dependencies {
    // Longdo Map API3 SDK
    implementation("com.longdo.map:sdk3:1.3.0")

    // MapConductor BOM pins every module below
    implementation(platform("com.mapconductor:mapconductor-bom:1.2.0"))

    implementation("com.mapconductor:core")
    implementation("com.mapconductor:for-longdo")
}
STEP 04

Hand over the API key

The module reads longdo.map.key from the manifest. You can also set it in code.

AndroidManifest.xmlXML
<manifest>
    <uses-permission android:name="android.permission.INTERNET" />

    <application>
        <meta-data
            android:name="longdo.map.key"
            android:value="${LONGDO_API_KEY}" />
    </application>
</manifest>
MainActivity.ktKotlin
// Alternative: set it in code before the first map is shown
com.longdo.sdk3.LongdoMap.API_KEY = "YOUR_LONGDO_API_KEY"
CAUTION
Never commit secrets.properties. Add it to .gitignore so it cannot slip in, and feed the value through environment variables (or another secure channel) in CI.

VERIFY

What you should see

The setup is complete when a map centred on Bangkok renders.

TestLongdo.ktJetpack Compose
@Composable
fun TestLongdo(modifier: Modifier = Modifier) {
    val mapState = rememberLongdoMapViewState(
        mapDesign = LongdoDesign.Normal,
        cameraPosition = MapCameraPosition(
            position = GeoPoint(13.7563, 100.5018),
            zoom = 12.0,
        ),
    )

    LongdoMapView(
        state = mapState,
        modifier = modifier,
        onMapLoaded = { /* map ready */ },
        onMapClick = { point -> /* tapped at point */ },
    )
}

Map designs

LongdoDesign maps onto Longdo's base layers.

LongdoDesign
Notes
Normal / Easy / Political
The standard family
Pastel / PastelGray / Light / Gray
Muted styles
Night / Dark / Hard
Dark and high-contrast styles
Satellite / Hybrid
Satellite imagery and hybrid
Osm
OpenStreetMap-based

Troubleshooting

The map does not appear

  • Check the key is registered against your app's package name — the SDK sends it for validation.
  • Confirm the INTERNET permission is present.

The build fails

  • Check that the map SDK coordinates and version match what your version catalog declares.
  • Make sure the repository is declared in settings.gradle.kts — with repositoriesMode set to FAIL_ON_PROJECT_REPOS, per-module repositories blocks are ignored.
  • If several map SDKs are present at once, look for dependency clashes with ./gradlew :app:dependencies.

Next

Markers, polylines, polygons, circles, ground images, raster layers and info bubbles all work through the shared API. Because Longdo's Android SDK runs Longdo Map JS API3 in a WebView, shapes are added to its internal MapLibre GL as GeoJSON sources with fill and line layers; hit-testing is done by the shared core's geodesic winding test.