Sha256: 28c7af34a37ef8bb5ba5099d2c3e773888cada841ba2306963359a357c83065c
Contents?: true
Size: 1.88 KB
Versions: 6
Compression:
Stored size: 1.88 KB
Contents
= Leaflet JS Rails == Overview leaflet-js wraps the Leaflet Javascript library in an asset gem so it can easily be used with Rails. It also includes the Leaflet.Label and Leaflet.Draw plusins. For more information about the Leaflet library, please visit http://leafletjs.com. == Installation In your Gemfile, add this line: gem "leaflet-js" Then, run bundle install. You're done! == Usage Leaflet provides javascript, css and image assets. The easiest way to use these assets in your project is to include leaflet-js.js and leaflet-js.css in your application.js and application.css files. You may also pick just the files you want to use in your project. === Javascripts leaflet-js.js <- Includes all the js files below leaflet.js leaflet.draw.js leaflet.label.js === Stylesheets leaflet-js.css <- Includes all the css files below leaflet.css leaflet.draw.css leaflet.draw.ie.css leaflet.label.css === Images layers.png layers-2x.png marker-icon.png marker-icon-2x.png market-shadow.png market-shadow-2x.png spritesheet.png spritesheet-2x.png Note when using Rails in production, with asset digests on, the Leaflet.Draw marker tool will not display an icon. The issue is that images included in this gem will be have a digest added to their name. However, the leaflet javascript code will be looking for asset/images/marker-icon.png or assets/images/marker-icon-2x.png. One solution is to copy the images to your public/images folder. Then you have to tell leaflet about the path by setting L.Icon.Default.imagePath to '/images' == Support If you have any questions about leaflet, please refer them to the Leaflet maintainers at http://leafletjs.com. If you have any questions about how leaflet-js wraps leaflet, then please refer to https://github.com/cfis/leaflet-js. == License See LICENSE for license information about leaflet-js. Please note that the Leaflet project has its own LICENSE file also.
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
leaflet-js-0.7.9 | README.rdoc |
leaflet-js-0.7.8 | README.rdoc |
leaflet-js-0.7.7 | README.rdoc |
leaflet-js-0.8.dev2 | README.rdoc |
leaflet-js-0.7.0.4 | README.rdoc |
leaflet-js-0.7.0.3 | README.rdoc |