Nakpath logoNakpath

Documentation

Nakpath ships as a binary XCFramework (iOS) and an AAR (Android). A valid license key is required before the engine will animate.

Nakpath is in private beta — APIs below are a preview. Join the waitlist for access to the binaries and full reference.

Install

iOS — Swift Package Manager:

// Package.swift
.package(url: "https://your-licensed-url/Nakpath", from: "1.0.0")
// Targets: Nakpath, NakpathAppleMaps, NakpathGoogleMaps

Android — Gradle (Maven):

dependencies {
    implementation("com.nakpath:kit:1.0.0")
}

License

Initialize with your per-app key before creating an engine. Never hard-code the key in committed source.

// iOS
import Nakpath
NakLicense.initialize(key: ProcessInfo.processInfo.environment["NAK_LICENSE_KEY"]!)

// Android
import com.nakpath.NakpathLicense
NakpathLicense.initialize(context, BuildConfig.NAK_LICENSE_KEY)

iOS quickstart

import Nakpath
import NakpathAppleMaps

let engine = NakEngine(
    config: NakConfig(baseDuration: 30, smoothingFactor: 0.15)
)
engine.loadRoutes([NakRoute(id: 1, points: coordinates)])
engine.start()

// SwiftUI
NakMapView(engine: engine, controller: mapController)

Android quickstart

val engine = NakEngine(
    config = NakConfig(baseDuration = 30.0, smoothingFactor = 0.15)
)
engine.loadRoutes(listOf(NakRoute(id = 1, points = coordinates)))
engine.start()

// Compose
NakMapView(engine = engine, carIcon = carBitmap)

Live GPS tracking

Feed raw GPS fixes; the engine interpolates and de-jitters between them. (Requires Growth or higher.)

// iOS
engine.addLiveCar(carId: 7, latitude: lat, longitude: lng)
engine.updateCarPosition(carId: 7, latitude: lat, longitude: lng) // on each fix

// Android
engine.addLiveCar(carId = 7, latitude = lat, longitude = lng)
engine.updateCarPosition(carId = 7, latitude = lat, longitude = lng)

Full API reference is provided with your license. Questions? ranbir@androidpoet.dev