Leaflet.Mapcodes

Mapcode control for LeafletJS

A Leaflet plugin to view mapcodes of the mouse pointer on mouse move.

Usage

Leaflet.Mapcodes depends on mapcode-js so include mapcode-js files, before this plugins javascript, and css code

<script type="text/javascript" src="mapcode-js/ndata.js"></script>
<script type="text/javascript" src="mapcode-js/ctrynams.js"></script>
<script type="text/javascript" src="mapcode-js/mapcode.js"></script>

<link rel="stylesheet" src="Leaflet.Mapcode.css" />
<script type="text/javascript" src="Leaflet.Mapcodes.js"></script>

Then add the control to the map like so:

L.control.Mapcode({
    position: "bottomleft",  // optional default "bottomright"
    labelTemplate: "Mapcode: {0}", // optional default "{0}"
}).addTo(map);

Standalone demo

Live Demo

License

Distributed under GNU General Public License V2 or greater