hulab / ClusterKit

An iOS map clustering framework targeting MapKit, Google Maps and Mapbox.
MIT License
512 stars 86 forks source link

International date line (longitude 180/-180) breaks clustering #31

Closed jonaspom closed 6 years ago

jonaspom commented 6 years ago

Hi

Great work with the Kit! Integration was easy and it actually works quite fast and reliable unlike the frameworks I have experimented before. However I think I found a special case that's not handled.

When navigating in GoogleMaps so that the view covers the international date line (longitude 180 / -180) all clusters on the map disappear. They reappear immediately when moving completely on either side of the line. Even though this is more of an inconvinience than a real blocker it gives an incomplete user experience and I would love to have this working. See the gif below for an example.

Even with this issue the ClusterKit is great, thank you. :)

img_8838 trim

MarvinNazari commented 6 years ago

This happens for me as well. The pins just disappears and appears again when u just zoom in or out or move a little bit.

maxep commented 6 years ago

Thanks @jonaspom for the report, I should be able to push a fix for the next version. Mapbox is also struggling with the visibleCoordinateBounds crossing the antimeridian: mapbox/mapbox-gl-native#4664, which introduce a weird behavior. I will see if I can find a workaround for Mapbox also.

jonaspom commented 6 years ago

Thanks @maxep However, the issue persists with Google Maps and the latest ClusterKit 0.3.3