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

Clustering count issue #1132

Open
mdellanave opened this issue Mar 24, 2025 · 2 comments
Open

Clustering count issue #1132

mdellanave opened this issue Mar 24, 2025 · 2 comments

Comments

@mdellanave
Copy link

Hi, I think there are some issues in clustering, or at least I'm doing something wrong here

https://codesandbox.io/p/sandbox/optimistic-leavitt-jqdn4p

In the array devices there are 379 item but if I zoom out

Image

Image

Something goes wrong...

Any help please?

@Viglino
Copy link
Owner

Viglino commented Mar 24, 2025

You have null coordinates in you devices. Just remove it and it'll work

for (const d of devices) {
  // Remove null coords
  if (d.longitude && d.latitude) {
    const feature = new Feature({
      poi: d,
      geometry: new Point(fromLonLat([d.longitude, d.latitude])),
    });
    poiLayer.getSource().addFeature(feature);
  }
}

@mdellanave
Copy link
Author

Ups sorry! thank you @Viglino!

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

2 participants