Skip to content

refactor: maps #2097

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 15 commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
30a6b8d
Refactor: Prepare for Google Maps integration
jamesarich Jun 12, 2025
9034ea8
Add basic map view and exclude secrets.properties
jamesarich Jun 13, 2025
683451a
Refactor: Implemented Google Maps with Waypoint and Node Functionality
jamesarich Jun 15, 2025
ce4d304
Refactor map view and update build configurations
jamesarich Jun 24, 2025
0146cd4
Refactor MapView composable
jamesarich Jun 25, 2025
b119aec
Refactor: MapView to use uiViewModel
jamesarich Jun 25, 2025
52e4f53
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jun 30, 2025
8ce3987
feat: Implement KML/KMZ layer support on map
jamesarich Jun 30, 2025
c83cf7e
Remove unnecessary MapViewModel injection in MapView
jamesarich Jun 30, 2025
a588b31
detekt
jamesarich Jul 1, 2025
6c7eaca
detekt
jamesarich Jul 1, 2025
cc0ebab
detekt
jamesarich Jul 1, 2025
4bf76be
fix fdroid check
jamesarich Jul 1, 2025
397d6a2
fix google build
jamesarich Jul 1, 2025
d29df4f
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 2, 2025
59cacb7
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 7, 2025
eb47951
Refactor: Handle location permissions and settings for map features
jamesarich Jul 7, 2025
5fd75a0
Refactor: Improve precision circle display on map
jamesarich Jul 7, 2025
cf24959
Refactor: Decompose MapView into smaller components
jamesarich Jul 7, 2025
7fbc0bd
Refactor: Extract MapViewModel for map-related state
jamesarich Jul 8, 2025
c570038
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 10, 2025
4d95793
feat: Add support for custom map tile providers and refactor map comp…
jamesarich Jul 10, 2025
4e2be8e
Refactor: Use constant for tile size in MapViewModel
jamesarich Jul 10, 2025
ca4c81e
feat: Implement initial map zoom to fit all nodes and waypoints
jamesarich Jul 10, 2025
a1d6ce2
Refactor: Display node track on map
jamesarich Jul 11, 2025
783cf8d
Refactor: Update MapControlsOverlay to use VerticalFloatingToolbar
jamesarich Jul 11, 2025
0040780
Refactor: Animate map controls on camera move
jamesarich Jul 11, 2025
149360c
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 12, 2025
706f5f2
build(fdroid): Add missing UIViewModel to NodeMapScreen
jamesarich Jul 12, 2025
5c12b8a
Merge branch 'main' into maps
jamesarich Jul 18, 2025
81c663b
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 20, 2025
1dbbcdb
refactor(map)!: move ModalBottomSheet to MapView
jamesarich Jul 20, 2025
2e9b0e2
Merge remote-tracking branch 'upstream/main' into maps
jamesarich Jul 24, 2025
898fd38
spotless
jamesarich Jul 24, 2025
503b5f1
Refactor: rename location conversion functions
jamesarich Jul 25, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ keystore.properties
# Kotlin compiler
.kotlin

# VS code
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why you override my ignores??

.vscode/settings.json
#project secrets
/secrets.properties
38 changes: 35 additions & 3 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

import io.gitlab.arturbosch.detekt.Detekt
import java.io.FileInputStream
import java.util.Properties

Expand All @@ -28,6 +29,7 @@ plugins {
alias(libs.plugins.protobuf)
alias(libs.plugins.devtools.ksp)
alias(libs.plugins.detekt)
alias(libs.plugins.secrets)
}

val keystorePropertiesFile = rootProject.file("keystore.properties")
Expand All @@ -50,7 +52,7 @@ android {
compileSdk = Configs.COMPILE_SDK
defaultConfig {
applicationId = Configs.APPLICATION_ID
minSdk = Configs.MIN_SDK_VERSION
minSdk = Configs.MIN_SDK
targetSdk = Configs.TARGET_SDK
versionCode =
Configs.VERSION_CODE // format is Mmmss (where M is 1+the numeric major number)
Expand Down Expand Up @@ -191,8 +193,10 @@ dependencies {
implementation(libs.bundles.coil)

// OSM
implementation(libs.bundles.osm)
implementation(libs.osmdroid.geopackage) { exclude(group = "com.j256.ormlite") }
"fdroidImplementation"(libs.bundles.osm)
"fdroidImplementation"(libs.osmdroid.geopackage) { exclude(group = "com.j256.ormlite") }

"googleImplementation"(libs.bundles.maps.compose)

// ZXing
implementation(libs.zxing.android.embedded) { isTransitive = false }
Expand Down Expand Up @@ -247,6 +251,19 @@ repositories {
detekt {
config.setFrom("../config/detekt/detekt.yml")
baseline = file("../config/detekt/detekt-baseline.xml")
source.setFrom(
files(
"src/main/java",
"src/google/java",
"src/fdroid/java",
)
)
parallel = true
}

secrets {
propertiesFileName = "secrets.properties"
defaultPropertiesFileName = "local.defaults.properties"
}

val googleServiceKeywords = listOf("crashlytics", "google")
Expand All @@ -260,3 +277,18 @@ tasks.configureEach {
enabled = false
}
}
tasks.withType<Detekt> {
reports {
xml.required = true
xml.outputLocation = file("build/reports/detekt/detekt.xml")
html.required = true
html.outputLocation = file("build/reports/detekt/detekt.html")
sarif.required = true
sarif.outputLocation = file("build/reports/detekt/detekt.sarif")
md.required = true
md.outputLocation = file("build/reports/detekt/detekt.md")
}
debug = true
include("**/*.kt")
include("**/*.kts")
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,5 @@ class MeshUtilApplication : GeeksvilleApplication() {
super.onCreate()

Logging.showLogs = BuildConfig.DEBUG

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import com.geeksville.mesh.android.Logging
class DataPair(val name: String, valueIn: Any?) {
val value = valueIn ?: "null"

/// An accumulating firebase event - only one allowed per event
// / An accumulating firebase event - only one allowed per event
constructor(d: Double) : this("BOGUS", d)
constructor(d: Int) : this("BOGUS", d)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,18 @@ open class GeeksvilleApplication : Application(), Logging {
companion object {
lateinit var analytics: AnalyticsProvider
}

/// Are we running inside the testlab?
val isGooglePlayAvailable: Boolean
get() {
return false
}
// / Are we running inside the testlab?
val isInTestLab: Boolean
get() {
val testLabSetting =
Settings.System.getString(contentResolver, "firebase.test.lab") ?: null
if(testLabSetting != null)
if (testLabSetting != null) {
info("Testlab is $testLabSetting")
}
return "true" == testLabSetting
}

Expand Down Expand Up @@ -69,5 +73,3 @@ open class GeeksvilleApplication : Application(), Logging {
isAnalyticsAllowed = false
}
}

fun Context.isGooglePlayAvailable(): Boolean = false
Original file line number Diff line number Diff line change
@@ -1,17 +1,32 @@
/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.geeksville.mesh.model.map.clustering;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Point;
import android.view.MotionEvent;

import org.osmdroid.api.IGeoPoint;
import org.osmdroid.bonuspack.kml.KmlFeature;
import com.geeksville.mesh.model.map.MarkerWithLabel;

import org.osmdroid.util.BoundingBox;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import org.osmdroid.views.overlay.Overlay;
import com.geeksville.mesh.model.map.MarkerWithLabel;

import java.util.ArrayList;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.geeksville.mesh.model.map.clustering;

import android.content.Context;
Expand All @@ -10,11 +27,12 @@
import android.graphics.drawable.Drawable;
import android.view.MotionEvent;

import com.geeksville.mesh.model.map.MarkerWithLabel;

import org.osmdroid.bonuspack.R;
import org.osmdroid.util.BoundingBox;
import org.osmdroid.util.GeoPoint;
import org.osmdroid.views.MapView;
import com.geeksville.mesh.model.map.MarkerWithLabel;

import java.util.ArrayList;
import java.util.Iterator;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,26 @@
/*
* Copyright (c) 2025 Meshtastic LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

package com.geeksville.mesh.model.map.clustering;

import com.geeksville.mesh.model.map.MarkerWithLabel;

import org.osmdroid.util.BoundingBox;
import org.osmdroid.util.GeoPoint;
import com.geeksville.mesh.model.map.MarkerWithLabel;

import java.util.ArrayList;

Expand Down
Loading