How can I separated markerClusterOptions and addLayersControl


I’m looking for a solution where I can cluster on all points, but at the same time i Want to make 2 layers of points…Currently, one cluster works for one layer, and the other cluster for the second layer.

Thank you for your help.

I don't think you can mix cluster across layers. Within a layer no problem, but across two (or more) seems to go against the intent of the feature.

Out of curiosity, what leads you to having two layers? Is it not possible to combine them into one - and drive the distinction by something like color or icons or what not?

I would like to have a customer layer and a prospect layer so that I can visualise one or the other or both. And finally, make a cluster on all the points (customers and prospects)

It is easy to have "parties" layer with customer status - active vs. prospective - distinguished by color (or icon or what not). But I don't see a viable route to clustering across layers.

Thanks a lot.
Is there a solution to split 2 points that are located at same address (at a fine zoom Level)?

You can copy a point between two datasets / leaflet layers.
But the same address will have the same coordinates - I would expect the two points to lay over each other.

If this is not the desired behaviour you can consider sf::st_jitter() to shake the points up a little bit so they do not align exactly.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.