mstahv / v-leaflet

Leaflet add-on for Vaadin
Other
43 stars 38 forks source link

Setting a CSS class to LCircleMarker does not work #205

Open sbaier1 opened 5 years ago

sbaier1 commented 5 years ago

I am using LCircleMarker and trying to set a CSS class to it, e.g. to animate location changes.

However, when inspecting the resulting SVG paths generated by leaflet, the marker will only ever have the default leaflet-interactive class, not adding the marker-style class, regardless which of the methods i use to set the style name on the LCircleMarker object.

final LCircleMarker lCircleMarker = new LCircleMarker(newPoint, 3);
int rgb = (int) (Math.random() * (1 << 24));
final String colorString = "#" + Integer.toHexString(rgb);
lCircleMarker.setColor(colorString);
lCircleMarker.setFillColor(colorString);
lCircleMarker.setFillOpacity(1D);
lCircleMarker.setStyleName("marker-style");
map.addComponent(lCircleMarker);
sbaier1 commented 5 years ago

probably related to #167