#L.Control.Rose Leaflet Plugin
North arrows or Compass Roses are used to dispay the cardinal directions on a map or are used simply as decorations.
This Leaflet plugin allows users to add a variety of svg norths arrow to their mapping applications
##Demo
Check out the demo here
##Using the Plugin
First add the L.Control.Rose.css, L.Control.Rose.js, and copy the arrows
directory from the dist directory into your root directory.
<link rel="stylesheet" href="dist/L.Control.Rose.css" />
<script src="dist/L.Control.Rose.js"></script>
Then add a div
for the north arrow somewhere in your app:
<div id="rose">
</div>
Create L.Control.Rose
and add it to the map:
var rose = L.control.rose('rose', {position:'bottomleft', icon:'default', iSize:'medium', opacity:0.8});
rose.addTo(map)
##Options
For now this plugin uses svg files. There will be a switch from svg files to just svg code in the future.
Positions are inherited from L.Control.
Opacity works the same as it always does.
###icons
default | arrow | circle | inner | hip | contrast | nautical |
---|---|---|---|---|---|---|
###iSize
size | value |
---|---|
large | 100px |
medium | 75px |
small | 50px |
xsmall | 25px |
#License
MIT