Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/adamico/leaflet-rails-example
example app for leaflet embed in rails A
https://github.com/adamico/leaflet-rails-example
Last synced: 1 day ago
JSON representation
example app for leaflet embed in rails A
- Host: GitHub
- URL: https://github.com/adamico/leaflet-rails-example
- Owner: adamico
- Created: 2013-06-03T11:17:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-06-03T11:45:32.000Z (over 11 years ago)
- Last Synced: 2023-04-18T08:18:21.497Z (over 1 year ago)
- Language: Ruby
- Homepage:
- Size: 132 KB
- Stars: 10
- Watchers: 2
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Example Rails 3 app originally created for the bounty https://bountify.co/embed-leaflet-in-a-rails-application
In order for the cloudmade integration to work you need to create an account and set the 'CLOUDMADE_API_KEY' environment variable.
To get the app started :
```
$ rake db:migrate
$ rake db:seed
$ rails s
```The markers for each Office instance get latitude and longitude values from the 'lat' and 'lon' columns of the offices table.
These columns get populated using the Cloudmade api by means of the corresponding ruby gem when the 'address1' attribute value changes.
By default the attributes used to get the geocoding coordinates are 'address1', 'city' and 'country' but they can be easily changed if needed by modifying the "#geocode" method in the office model.