aboutsummaryrefslogtreecommitdiff
path: root/androidApp/src/main/java
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
commit3a6ba961bc9d7339ecf89115944d6f5c299ed743 (patch)
tree5ffa9a54c7e13271501f807e2eb41c0c0770df3b /androidApp/src/main/java
parentbdc676c18fa845eb655c9bfbb7cfd5b7940ed0ed (diff)
downloadetbsa-trackermap-mobile-3a6ba961bc9d7339ecf89115944d6f5c299ed743.tar.gz
etbsa-trackermap-mobile-3a6ba961bc9d7339ecf89115944d6f5c299ed743.tar.bz2
etbsa-trackermap-mobile-3a6ba961bc9d7339ecf89115944d6f5c299ed743.zip
Improved cluster generator style and disabled selection
Diffstat (limited to 'androidApp/src/main/java')
-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)