humangeo / leaflet-dvf

Leaflet Data Visualization Framework
MIT License
689 stars 153 forks source link

Create RegularPolygonMarker in featureGroup #127

Open JePedrosa opened 6 years ago

JePedrosa commented 6 years ago

Hello, I'm trying to create a RegularPolygonMarker and add it to a layer that I already had generated, a markerCluster, but it will not let me add it to this, could someone help me? Then I pass the code of how I believe it. Thank you

puntos_red_distribucion= new L.MarkerClusterGroup();

var prueba = new L.RegularPolygonMarker([x, y], {
    color: '#000',
    weight: 1,
    fillColor: "red",
    radius: 7,
    fillOpacity: 1,
    numberOfSides: 5,
    id: consulta
});

prueba.addTo(puntos_red_distribucion)