Skip to content

Are rotationAngle and rotationOrigin broken for custom icons? #28

@HodellersHedge

Description

@HodellersHedge

With the following code everything appears to work correctly:
var You = L.latLng([500, 500]);
L.marker(You, {rotationAngle: 25}, {rotationOrigin: [32, 33]}).addTo(map);
default-icon

Now, by adding an icon and passing it as second argument, the rotationAngle appears to have no effect:
var You = L.latLng([500, 500]);
var greenIcon = L.icon({iconUrl: 'favicons/tarkov/Legend/green-icon.png'});
L.marker(You, {icon: greenIcon}, {rotationAngle: 25}, {rotationOrigin: [32, 33]}).addTo(map);
custom-icon

btw the green icon looks that way by default as png. it didnt rotate at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions