Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rotationAngle conflicts with Leaflet.RotatedMarker #94

Open
thammarith opened this issue Jun 12, 2019 · 4 comments
Open

rotationAngle conflicts with Leaflet.RotatedMarker #94

thammarith opened this issue Jun 12, 2019 · 4 comments

Comments

@thammarith
Copy link

I imported this library and your Leaflet.RotatedMarker. When I want to rotate the marker using Leaflet.RotatedMarker, the markers are not rotated properly, e.g., 45 degrees rotates as 90 degrees.

import 'leaflet-polylinedecorator';
import 'leaflet-rotatedmarker';

L.marker([point.lat, point.lon], {
  rotationAngle: point.azm,
}).addTo(this.map));

Is it possible if you would please name the rotationAngle option differently?

@lucid111
Copy link

lucid111 commented Sep 9, 2019

i also met

@jmanghani
Copy link

Did you guys fix this? How? We are having the same issue.

@pavloniym
Copy link

pavloniym commented Jan 21, 2021

Same issue, guys...

Update:
Fixed by using only leaflet-polylinedecorator and removing leaflet-rotatedmarker package from project.
This package has all functionality of rotatedmarker

@thammarith
Copy link
Author

thammarith commented Jan 21, 2021

Oh, I forgot that I had opened this issue. What I did for workaround was divide the angle by 2.

What it does (if I recall correcty since I haven't touched this for about a year) is leaflet-polylinedecorator rotates for x degrees then leaflet-rotatedmarker rotates for another x degrees, i.e., it rotates for 90 degrees since it rotates 45 degrees twice.

Since @pavloniym informed that leaflet-polylinedecorator can do that by itself, this workaround isn't needed. Follow what suggested above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants