Git Product home page Git Product logo

Comments (13)

mountainvat avatar mountainvat commented on May 16, 2024 1

By reference so you only need to update them in your original list.

from google-maps-ios-utils.

mountainvat avatar mountainvat commented on May 16, 2024

I assume that you were referring to updating cluster item's position? If it is the case then you can call [clusterManager cluster] again after your update(s). Remember that for good performance, perform all your updates and call [clusterManager cluster] at the end.

from google-maps-ios-utils.

chlebta avatar chlebta commented on May 16, 2024

But _items array is not accessible from outside so I can update the data

from google-maps-ios-utils.

mountainvat avatar mountainvat commented on May 16, 2024

I'd imagine you could hold on to the items in a separate array when you add them to the clusterManager.

from google-maps-ios-utils.

chlebta avatar chlebta commented on May 16, 2024

Items will passed by reference or value ?

from google-maps-ios-utils.

mountainvat avatar mountainvat commented on May 16, 2024

@chlebta Have you got any luck? Can I close the ticket?

from google-maps-ios-utils.

amadeubandrade avatar amadeubandrade commented on May 16, 2024

@mountainvat a question related to this.
Imagine that we have a huge database and all the items will be markers on the map.
Do we need to download all the information we need first and only after that update the cluster manager? This can cause a long delay before anything is being showed to the user.
Do you know if there is any other way to handle this without losing performance? E.g. updating the cluster manager every time a marker is added.

from google-maps-ios-utils.

mountainvat avatar mountainvat commented on May 16, 2024

Is the database on the mobile or on a server? If it is on a server, it is probably best to do some server side filtering. So you'd give the server your latitude ,longitude range of interest and the server will only return items within that range for example. Downloading all items to the client is not very scalable.

from google-maps-ios-utils.

domesticmouse avatar domesticmouse commented on May 16, 2024

Closing this issue out as stale. Please re-open if this is still an issue. Thanks!

from google-maps-ios-utils.

ravigupta049 avatar ravigupta049 commented on May 16, 2024

Hi,
I have an array of cluster item and i am updating the position of particular cluster item, but the app is getting crashed.
All i want a way is to update position of particular cluster item.

I am doing something like this:
item.position = Some coordinate
clusterManager?.cluster()

Following is the error i got when i updated the position.
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'All items should be mapped to a distance'

Can some please tell me how to do it. Really appreciate quick response because i am stuck into this.

from google-maps-ios-utils.

lexuanquynh avatar lexuanquynh commented on May 16, 2024

the same issues.

from google-maps-ios-utils.

lexuanquynh avatar lexuanquynh commented on May 16, 2024

check lat:
if lat > 85 || lat < -85 {
//don't add clusterManager.add(item)
}
it a little code make app not crash, but
I don't know why it run.

from google-maps-ios-utils.

kwilk83 avatar kwilk83 commented on May 16, 2024

I ran into this issue too and it was due to using invalid lat long values.

from google-maps-ios-utils.

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.