Mojolicious::Plugin::Leafletjs - A Mojolicious Plugin
# Mojolicious $self->plugin('Leafletjs'); # Mojolicious::Lite plugin 'Leafletjs'; # In your template <%= leaflet { name => 'map1', latitude => '35.9239', longitude => '-78.4611', zoomLevel => 18, markers => [ { name => 'marker1', latitude => '35.9239', longitude => '-78.4611', popup => 'A new message tada!', }, { name => 'marker2', latitude => '35.9235', longitude => '-78.4610', popup => 'A second popup here!', } ], } %>
Mojolicious::Plugin::Leafletjs is helpers for integrating simple maps via leafletjs
Accepts the following options:
Name of map variable
Longitude
Latidude
CSS id of map
Map zoomlevel
URL of map tile layer, defaults to a cloudmade.com tile
Max zoom into the map
Show some love for the leaflet team, openmap, and cloudmade map tiles
Array of hashes containing the following key/value:
Marker name
Latitude
A popup message
Array of hashes containing the following key/value
Name of circle variable
longitude
latitude
circle color
circle fill color
circle opacity
radius of circle in meters
Always welcomed! https://github.com/battlemidget/Mojolicious-Plugin-Leafletjs
Adam Stokes <adamjs@cpan.org>
Copyright 2013- Adam Stokes
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Mojolicious::Plugin::Leafletjs, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Plugin::Leafletjs
CPAN shell
perl -MCPAN -e shell install Mojolicious::Plugin::Leafletjs
For more information on module installation, please visit the detailed CPAN module installation guide.