T
T
TechNOIR2018-02-05 13:26:01
OpenStreetMap
TechNOIR, 2018-02-05 13:26:01

leaflet. How to cluster polygons on a map?

Good afternoon.
There is a Leaflet plugin for marker clustering. Here it
is. It looks like this:
5a7830b6326a7935538288.png
Is it possible to use it to display not cluster circles but polygons? For example, when hovering over a cluster, it shows the polygon on which it counts the number.
I would like this grid of polygons to always be displayed and it to be the same color as the color of the circle
5a78311debc63831796171.png
. Is it even possible to do this?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2018-02-05
@freeExec

You can, the more he shows it when you hover.
https://github.com/Leaflet/Leaflet.markercluster/b...

D
dom1n1k, 2018-02-05
@dom1n1k

You can tweak the code of this very plugin and it will draw polygons all the time, and not just on hover.
BUT! In pursuit of speed, they have applied such a clustering algorithm that clusters / polygons can intersect, often quite strongly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question