Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

222
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda