Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

226
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda