Added docstring Example
@@ -758,6 +758,18 @@ class MarkerCluster(Layer):
Whether the Layer will be included in LayerControls
icon_create_function : string, default None
Override the default behaviour, making possible to customize markers colors and sizes
+
+ Example
+ -------
+ >>> icon_create_function = '''
+ ... function (cluster) {
+ ... var childCount = cluster.getChildCount();
+ ... var c = ' marker-cluster-small';
+ ... return new L.DivIcon({ html: '<div><span>' + childCount + '</span></div>',
+ className: 'marker-cluster' + c,
+ iconSize: new L.Point(40, 40) });
+ ... }
+ ... '''
"""
def __init__(self, name=None, overlay=True, control=True, icon_create_function=None):
super(MarkerCluster, self).__init__(name=name, overlay=overlay,
