Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 24 additions & 24 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
== 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.
plugins. For more information about the Leaflet library, please visit http://leafletjs.com.

== Installation

In your Gemfile, add this line:

gem "leaflet-js"
gem "leaflet-js"

Then, run bundle install. You're done!

Expand All @@ -21,37 +21,37 @@ 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
* 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
* 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
* 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.
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'
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

Expand All @@ -62,4 +62,4 @@ 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.
has its own LICENSE file also.
2 changes: 1 addition & 1 deletion leaflet-js.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
spec.homepage = 'https://github.com/cfis/leaflet-js'
spec.summary = <<-EOS
Wraps the Leaflet Javascript Mapping Library in a Rails asset gem. Also include Leaflet.Label
and Leaflet.Draw plusins. For more information
and Leaflet.Draw plugins. For more information
about Leaflet please see http://leafletjs.com/
EOS

Expand Down