Code Monkey home page Code Monkey logo

Comments (5)

matopeto avatar matopeto commented on June 13, 2024

I have same issue, i think it is caused by: #130 when for every different zoom/region/positon of map are different anotations :(

from cluster.

matopeto avatar matopeto commented on June 13, 2024

I make video:

RPReplay_Final1610634992.mov

There should be always 34 annotations. mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) is called correctly, with correct clusters and annotations, but on map is not some clusters rendered

Also each minimal map zoom changes regroups all clusters

from cluster.

rnkyr avatar rnkyr commented on June 13, 2024

It caused by the fact that mapRects() method builds a list of rects dependant on a viewport

so, if you zoom to a level N, then zoom to a level N + m and then get back to the level N you won't get the same rect, hence you'll get different clusters/pins

is there any suggestion on how to improve this behavior?

from cluster.

rnkyr avatar rnkyr commented on June 13, 2024

ok, I was able to improve the overall picture by rounding the scale factor (

let scaleFactor = zoomScale / cellSize(for: zoomLevel)
) to the nearest non-zero digit. the function that does that can be found at https://stackoverflow.com/a/32194113/5247504

from cluster.

matopeto avatar matopeto commented on June 13, 2024

But one thing is cluster changing another is non rendered culusers :(

from cluster.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.