Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ANR with Marker Clustering #438

Open
Whappens opened this issue Sep 15, 2023 · 2 comments
Open

ANR with Marker Clustering #438

Whappens opened this issue Sep 15, 2023 · 2 comments

Comments

@Whappens
Copy link

Whappens commented Sep 15, 2023

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)
}
@MKergall
Copy link
Owner

Is the ANR occuring when creating markers/cluster, or at drawing, or specifically at a zoom level change ?

@Psijic
Copy link

Psijic commented Sep 19, 2023

Zoom change.

I see no extra code repeats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants