From bca4d82fcbd7fd1c89c6879eee0a9718699df049 Mon Sep 17 00:00:00 2001 From: Iván Ávalos Date: Tue, 11 Jan 2022 04:32:52 -0600 Subject: Implemented clustering --- .../java/mx/trackermap/TrackerMap/android/map/MapFragment.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'androidApp/src/main/java/mx/trackermap/TrackerMap') 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 fa0a56e..f87d89a 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 @@ -145,13 +145,21 @@ class MapFragment : GlobeMapFragment() { screenMarker.size = markerSize screenMarker.userObject = marker.id screenMarker.selectable = true + if (!isReport) { + screenMarker.layoutImportance = 1.0f + } screenMarker } + val markerInfo = MarkerInfo() + if (!isReport) { + markerInfo.setClusterGroup(0) + } + objects.add(mapControl.addScreenMarkers( screenMarkers, - MarkerInfo(), + markerInfo, ThreadMode.ThreadAny )) -- cgit v1.2.3