Markerclustergroup and Layercontrol

196 views
Skip to first unread message

Martin Friedrich

unread,
Feb 14, 2013, 11:17:14 AM2/14/13
to leafl...@googlegroups.com

Hi,

I have a map with markers in a MarkerClusterGroup. Depending on the Zoom Level I can see the Markers or one circle with the number of markers. This works fine.

Now I want to integrate the MarkerClusterGroup in my Layercontrol to make the Markers switchable. With the "standalone" markers this seems to be no problem. I can switch the Layer "aufgaben" on and off. But I also want to sitch the MarkerClusterGroup ( the circle with the number of markers). I tried to switch "cluster", but this doesn't work.

var cluster = new L.MarkerClusterGroup();
            aufgaben.addData(csv);
            cluster.addLayer(aufgaben);
            map.addLayer(cluster);

    var layersControl = new L.Control.Layers({
            'Übersicht': cloudmade
        }, {
            'Aufgabe': aufgaben
            });

I would be happy for ideas.

Regards

Martin

Rostislav Nétek

unread,
Sep 5, 2014, 5:52:19 PM9/5/14
to leafl...@googlegroups.com
Hi...have your solved this problem?

Dne čtvrtek, 14. února 2013 17:17:14 UTC+1 Martin Friedrich napsal(a):

Martin Friedrich

unread,
Sep 7, 2014, 2:09:04 PM9/7/14
to leafl...@googlegroups.com
Hi,
no sorry, i haven't solved it. I don't usw the markerclustergroup anymore. But if there is a solution, i would be happy, Zoo.
Reply all
Reply to author
Forward
0 new messages