From f024a6a1cbcb68395fe1a15d4ac852c2be2416e6 Mon Sep 17 00:00:00 2001 From: Peter Stone Date: Sun, 22 Mar 2026 23:48:32 +0000 Subject: chore: unify and centralize agent configuration in .agent/ --- .../app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt | 14 ++++++++++++++ android-app/local.properties | 12 +----------- 2 files changed, 15 insertions(+), 11 deletions(-) (limited to 'android-app') diff --git a/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt b/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt index 2e67975..91569cf 100644 --- a/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt +++ b/android-app/app/src/main/kotlin/org/terst/nav/ui/MapHandler.kt @@ -1,6 +1,9 @@ package org.terst.nav.ui import android.graphics.Bitmap +import org.maplibre.android.camera.CameraPosition +import org.maplibre.android.camera.CameraUpdateFactory +import org.maplibre.android.geometry.LatLng import org.maplibre.android.maps.MapLibreMap import org.maplibre.android.maps.Style import org.maplibre.android.style.layers.CircleLayer @@ -81,6 +84,17 @@ class MapHandler(private val maplibreMap: MapLibreMap) { }) } + /** + * Centers the map on the specified location. + */ + fun centerOnLocation(lat: Double, lon: Double, zoom: Double = 14.0) { + val position = CameraPosition.Builder() + .target(LatLng(lat, lon)) + .zoom(zoom) + .build() + maplibreMap.animateCamera(CameraUpdateFactory.newCameraPosition(position), 1000) + } + /** * Updates the anchor watch visualization on the map. */ diff --git a/android-app/local.properties b/android-app/local.properties index 7c003fd..daae45e 100755 --- a/android-app/local.properties +++ b/android-app/local.properties @@ -1,11 +1 @@ -# This file must *NOT* be checked into Version Control Systems, -# as it contains information specific to your local installation. -# -# Location of the Android SDK. This is only used by Gradle. -# ANDROID_HOME environment variable must be set to your Android SDK path. -# Example: -# sdk.dir=/home/user/Android/Sdk -# sdk.dir=/Users/user/Library/Android/sdk (macOS) -# sdk.dir=C\:\\Users\\user\\AppData\\Local\\Android\\Sdk (Windows) -# -# sdk.dir= +sdk.dir=/opt/android-sdk -- cgit v1.2.3