question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rotation of Markers

See original GitHub issue

Feature request. Allow the markers to be rotated.

The markers that I am displaying on the map have an orientation and it’d be nice to have a simple way of rotating the marker to this orientation. Currently, I’m grabbing the img tag and applying a CSS3 transform with jquery whenever the orientation changes. It works but it’s hacky and there are other webkit transforms already applied the tag.

$(marker._icon).css('-webit-transform','rotate(90deg)')

It’d be nice to have this built into the framework.

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Reactions:6
  • Comments:26 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
ghybscommented, Jan 19, 2018

Hi @Deilan,

Thank you for your message.

It looks to me that @bbecquet’s Leaflet Rotated Marker plugin does the job (demo). You might also be interested in other plugins, e.g. leaflet.orientedMarker.

IMHO Leaflet project’s philosophy is to provide the most common functionality in core, and delegate more specific features to plugins. As such, having this feature in a plugin sounds an appropriate situation.

I will add Rotated Marker to the plugins list and will mark this Feature Request as closed.

For the sake of completeness, I will mention PR #2362 as an attempt to merge this feature a while back. Unfortunately, it looks like there was some incompatibilities with old browsers and other customizations (transparency…). It has been closed for inactivity, but feel free to revive it if you can update the code for Leaflet current version!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Rotate marker symbol layers—ArcGIS Pro | Documentation
You rotate markers by setting an angle in 2D or by rotating around three axes in 3D and specifying additional rotation behavior.
Read more >
Showing directions using marker rotation in a scatter plot
The rotation of the markers can be made clockwise or counter-clockwise. A full rotation is 360 degrees, and a value of 361 is...
Read more >
Use rotation of marker - Siemens PLM
When you enter a rotation angle, for example 90°, it looks like this: You can set the rotation angle in the dialog Edit...
Read more >
Rotate Markers in functions like plot, scatter, etcetera #19195
The way I have found to rotate markers, is using a private attribute from the markers called '_transform', this attribute has methods to...
Read more >
Solved: Point Marker Rotation - Civil 3D - Autodesk Forums
Point Marker Rotation · World Coordinate System: Indicates that the marker rotation angle is relative to the world coordinate system · Object: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found