aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java/mx/trackermap
diff options
context:
space:
mode:
authorIván Ávalos <avalos@disroot.org>2022-01-12 19:42:20 -0600
committerIván Ávalos <avalos@disroot.org>2022-01-12 19:42:20 -0600
commite79d43997bad2bb04e1e7fa5aec888d1bcad38e4 (patch)
tree5ffa9a54c7e13271501f807e2eb41c0c0770df3b /androidApp/src/main/java/mx/trackermap
parent1aa7c90de645cdef4fd73eb184546642caf1a6ec (diff)
downloadetbsa-trackermap-mobile-e79d43997bad2bb04e1e7fa5aec888d1bcad38e4.tar.gz
etbsa-trackermap-mobile-e79d43997bad2bb04e1e7fa5aec888d1bcad38e4.tar.bz2
etbsa-trackermap-mobile-e79d43997bad2bb04e1e7fa5aec888d1bcad38e4.zip
Improved cluster generator style and disabled selection
Diffstat (limited to 'androidApp/src/main/java/mx/trackermap')
-rw-r--r--androidApp/src/main/java/mx/trackermap/TrackerMap/android/map/MapFragment.kt14
1 files changed, 14 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 1b736d1..019bb1e 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
@@ -71,6 +71,20 @@ class MapFragment : GlobeMapFragment() {
val loader = QuadImageLoader(params, tileInfo, baseControl)
loader.setImageFormat(RenderController.ImageFormat.MaplyImageUShort565)
+ val clusterGenerator = BasicClusterGenerator(
+ intArrayOf(
+ Color.argb(255, 255, 255, 255)
+ ), 0, Point2d(64.0, 64.0), baseControl, activity
+ )
+ clusterGenerator.cacheBitmaps(true)
+ clusterGenerator.setExponentBase(2.5)
+ clusterGenerator.setTextColor(Color.BLACK)
+ clusterGenerator.setLayoutSize(Point2d(80.0, 80.0))
+ clusterGenerator.setSelectable(false)
+
+ baseControl.clearClusterGenerators()
+ baseControl.addClusterGenerator(clusterGenerator)
+
val latitude = 23.191
val longitude = -100.36
focusOn(latitude, longitude, zoom = 0.4, animated = false)