Start a new topic

Advanced clustering POIs feature

Good Morning, 

I wanted to realize a single marker containing more POIs using js, such as this.

I've red documentation and various post regarding clustering but they are outdated and partial.

Can you help me to find some complete example or more detailed informations?

Best regards,

Mario Blangiforti

1 Comment

Hello Mario,

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.

Once you implemented your clustering algorithm (e.g. using the very basic implementation from the post above), it is up to you how to display custered places. You may:

  1. calculate the average lat/lon and place a clustered-marker-asset (using e.g. AR.ImageDrawable) there and e.g. show a list of the stacked pois when user clicks on it
  2. adjust the altitude of the placemarks, depending on the distance. Ensure to adjust location manager, so you ignore altitude in general by reporting always altitude 0 to the architectView
  3. go a more advanced approach and implement an animation so clustered places appear somewhere relative to the average position, as descriped in first approach

You may even allow user to adjust the range and update clustering algorithm on distance/location updates.

The topic is a quite complex one when markers are quite big and contain labels and thumbnails. In case markers are just of a size of your thumb's nail you can reduce the number of stacked sizes to a minimum.



Login or Signup to post a comment