⛵️ Leaflet.BoatMarker
A leaflet boat marker using HTML Canvas. Checkout the Demo.
Can be used to symbolize sailboats/sailyachts or motorboats/motoryachts with optional wind information.
Installation
- Include the script directly
<script src="https://unpkg.com/leaflet.boatmarker/leaflet.boatmarker.min.js"></script>
- Use in a build script via npm
npm i leaflet.boatmarker --save
Usage
var boatMarker = L;
setHeading(heading)
Sets the current heading of the boat to an angle value between 0 and 360 degrees.
boatMarker;
setHeadingWind(heading, windspeed, winddirection)
Sets the current heading of the boat to an angle value between 0 and 360 degrees, the current wind direction to an angle value between 0 and 360 degress and the wind speed (in knots) following this weather wind arrow specification http://www.wetterklima.de/segeln/windpfeile/bf.htm
boatMarker;
setSpeed(speed)
Set the current speed of the boat to a value > 0
boatMarker;