aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-17 15:51:47 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-17 15:51:47 -0600
commit7ab652acd172963b2f36085eb9be6927cb21fc71 (patch)
tree4e826c625fa12315280454bb57db43dde9dde13d /androidApp/src/main/java/mx/trackermap/TrackerMap/android/map
parentd91688765774ccb9153a5236edf359a8fa3a0f62 (diff)
downloadetbsa-trackermap-mobile-7ab652acd172963b2f36085eb9be6927cb21fc71.tar.gz
etbsa-trackermap-mobile-7ab652acd172963b2f36085eb9be6927cb21fc71.tar.bz2
etbsa-trackermap-mobile-7ab652acd172963b2f36085eb9be6927cb21fc71.zip
Fixed reports fragment map data display, and added geofences
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap/android/map')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt5
1 files changed, 5 insertions, 0 deletions
diff --git a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
index cd1778a..1ba8fd6 100644
--- a/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
+++ b/androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt
@@ -24,6 +24,7 @@ import mx.trackermap.TrackerMap.client.models.MapLayer
import mx.trackermap.TrackerMap.utils.MapCalculus
import mx.trackermap.TrackerMap.utils.MarkerType
+typealias SetupCallback = () -> Unit
typealias MarkerCallback = (Int?) -> Unit
class MapFragment : GlobeMapFragment() {
@@ -38,6 +39,8 @@ class MapFragment : GlobeMapFragment() {
val type: MarkerType = MarkerType.DEFAULT
)
+ var hasStarted: Boolean = false
+ val setupCallbacks = mutableListOf<SetupCallback>()
var markerCallback: MarkerCallback? = null
private val objects = mutableListOf<ComponentObject>()
@@ -65,6 +68,8 @@ class MapFragment : GlobeMapFragment() {
override fun controlHasStarted() {
Log.d("MapFragment", "controlHasStarted")
+ hasStarted = true
+ setupCallbacks.forEach { it() }
if (tileInfo == null) {
val layer = MapLayer.defaultLayer