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

144
Visualizações
Openlayers 6: how do i get all clusters to stack with eachother

i was wondering how i would get all clusters to stack with eachother and not ontop of eachother

https://imgur.com/a/hzRdDct

This is what it looks like right now but i want the clusters to stack to eachothers when they are different layers

var TowerLayer = new ol.layer.AnimatedCluster({
title: 'Towers',
name: 'Cluster',
source: new ol.source.Cluster({
distance: 40,
source: new ol.source.Vector({
features: Towers
})
}),
animationDuration: 700,
style: TowerStyle
});

var ChimneyLayer = new ol.layer.AnimatedCluster({
title: 'Chimneys',
name: 'Cluster',
source: new ol.source.Cluster({
distance: 40,
source: new ol.source.Vector({
features: Chimneys
})
}),
animationDuration: 700,
style: ChimneyStyle
});

Heres how im creating the layers

TowerLayer.getSource().getSource().clear();
 
TowerLayer.getSource().getSource().addFeatures(Towers); ChimneyLayer.getSource().getSource().clear()
ChimneyLayer.getSource().getSource().addFeatures(Chimneys):

and then heres how im adding the clusters to the layers.

i tried to search around on google for an answer and didnt really get a clear one

about 4 years ago · Juan Pablo Isaza
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