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

145
Vistas
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 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