Leaflet – top side of map always points to heading direction of a sensor Code Answer

Hello Developer, Hope you guys are doing great. Today at Tutorial Guruji Official website, we are sharing the answer of Leaflet – top side of map always points to heading direction of a sensor without wasting too much if your time.

The question is published on by Tutorial Guruji team.

I’m developing a basic leaflet map that updates periodically based on latlng and heading of a sensor.

I’ve got the marker updating based on latitude and longitude inputs, now I need to adjust the view so that the top always represents the direction of the sensor (heading).

Thanks for your help!

Answer

This is not possible with leaflet

See Rotating a map using leaflet js library

There seems to be other possibilities if this is a major requirement: http://ol3js.org/en/master/examples/drag-rotate-and-zoom.html

We are here to answer your question about Leaflet – top side of map always points to heading direction of a sensor - If you find the proper solution, please don't forgot to share this with your team members.

Related Posts

Tutorial Guruji