I have ANR using RadiusMarkerClusterer using zoom with 5k+ markers on the map. And it's fine enough (no ANRs) while I use simple FolderOverlay. I see no extra code repeats and suppose, I can't wrap it within a coroutine or something like that to increase performance.
items.forEach { item ->
val marker = Marker(mapView).apply {
position = GeoPoint(item.latLng.latitude, item.latLng.longitude)
// relatedObject = item
}
marker.setOnMarkerClickListener { osmMarker, _ ->
Timber.v("Marker clicked: ${osmMarker.title}")
true
}
cluster.add(marker)
}
I have ANR using
RadiusMarkerClustererusing zoom with 5k+ markers on the map. And it's fine enough (no ANRs) while I use simpleFolderOverlay. I see no extra code repeats and suppose, I can't wrap it within a coroutine or something like that to increase performance.