I have read through the documentation but can't seem to find a way to rotate a marker using ngx-leaflet (I would like to dynamically change based on my compass heading).
I have read through the documentation but can't seem to find a way to rotate a marker using ngx-leaflet (I would like to dynamically change based on my compass heading).
Here is the solution as there is a type definition for this:
npm i -S @types/leaflet-rotatedmarker leaflet-rotatedmarker
Then just import the module:
import 'leaflet-rotatedmarker';
Now your marker has extra functions to set rotation: