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

143
Views
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
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!