Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

220
Views
maplibre-gl - clusteered source doesn't render some of the features

I have a clustered geojson source with more than 500 features. I added two layers for this source: one for rendering single features when there is no point_count and another when there is point_count (based on this example in the docs: https://maplibre.org/maplibre-gl-js-docs/example/cluster/).

The issue is some of the features (mainly towards the end of the features array) do not render at all, either as clusters or single circles, no matter how far I zoom in.

Here's an example that shows the issue: https://codepen.io/kaveh/pen/NWaaOaQ.

The red circles are from a separate non-clustered source and layer called stations and stations-single respectively, which are there to show that all features can actually be rendered. The layer has a click event that shows the coordinates in a popup.

The clustered source (called clustered-stations) and its layers are after line 6121 and are rendered in shades of blue/green.

If you click on "Zoom to missing station" at the bottom of the map, it zooms the map to station 353, rendered by stations-single in red, but not by clustered-stations. As you can see, some other stations in the clustered-stations layer are rendered fine.

Am I doing something wrong with the styling of my clustered layers or their filters? Or is this a bug in maplibre-gl (and possibly mapbox-gl, though I haven't tested it with mapbox)?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I found the source of the problem. It's caused by supercluster, one of the dependencies of maplibre-gl. It expects the longitudes to be within the [-180, 180] range and anything beyond that range gets dropped.

The quick workaround is to fix the coordinates. I've also submitted a PR to do this in supercluster: https://github.com/mapbox/supercluster/pull/194.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!