bbecquet / Leaflet.RotatedMarker

Leaflet plugin to enable the rotation of map marker icons
MIT License
258 stars 100 forks source link

Rotation modifies z-index on each zoom #25

Open serjflint opened 4 years ago

serjflint commented 4 years ago

Hello!

I am using leaflet-django with leaflet 1.6.0.

I have polylines and many markers on my map. Some markers should be visible all the time and I used z-index of markerPane for that. But after adding RotatedMarker I have styles like following:

element.style {
    margin-left: -16px;
    margin-top: -16px;
    width: 32px;
    height: 32px;
    transform: rotate(102deg);
    z-index: 324;
    transform-origin: center center;
}

And z-index forcibly changes on every zoom or update to some random value. I want to have some control over z-index.

serjflint commented 4 years ago

For now I use CSS-style for all markers with !important.