Start a new topic

Clustering of Pois not working

Clustering of Pois not working


I have issue of overlapping of Pois.

To solve that I added clustering.js and added code to change the altitude.


for (var currentPlaceNr = 0; currentPlaceNr < poiData.length; currentPlaceNr++) {

var singlePoi = {


"latitude": parseFloat(poiData.latitude),

"longitude": parseFloat(poiData.longitude),

"altitude": parseFloat(poiData.altitude),

"imagePath": poiData.imagePath




World.placeGeoObjects  = ClusterHelper.createClusteredPlaces(20, World.userLocation, World.markerListUnclustered);


//go through all clusters

for (var i = 0; i < World.placeGeoObjects.length; i++) {

//go through all items in each cluster

for (var j = 0; j < World.placeGeoObjects.places.length; j++) {

singlePoi = World.placeGeoObjects.places;

// the singlePoi altitude is originally 

// it will be increased by 50 for each item remaining in the cluster

singlePoi.altitude =  j * 50;

// Add pois to World

World.markerList.push(new Marker(singlePoi));




Still no change in overlapping issue. What is the reason for that? 


As written in the "Avoid Stacking of Pois"-post the provided approach is just a beginner's approach.

In the short run you may increase the "bubbleAngle" value, so the algorithm reserves more space for your markers/info-bubbles.
In the long run please adjust the clustering mechanism so it fits your needs best, you may e.g. apply your own sophisticated algorithm once user moved for some meters.

Kind regards,

Login or Signup to post a comment