Skip to content

Commit

Permalink
Using distance control, updating weather
Browse files Browse the repository at this point in the history
  • Loading branch information
alno committed May 24, 2012
1 parent 3554823 commit cbc2ab1
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 125 deletions.
8 changes: 7 additions & 1 deletion Vendorfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
folder 'vendor/assets/javascripts' do
from 'https://github.com/alno/osm-js-libs.git' do
from 'https://github.com/alno/osm-js-libs.git', :branch => 'leaflet-dev' do
file 'osmjs.validators-layer.js', 'dist/validators/leaflet-layer.js'
file 'osmjs.validators-errors.js', 'dist/validators/jquery-errors-control.js'
file 'osmjs.validators-sources.js', 'dist/validators/jquery-sources-control.js'
file 'osmjs.weather-layer.js', 'dist/weather/leaflet-layer.js'
file 'osmjs.distance-control.js', 'dist/distance/leaflet-control.js'
end

file 'leaflet.scale.js', 'https://raw.github.com/shurshur/leaflet-plugins/master/control/Scale.js'
Expand All @@ -12,5 +13,10 @@ folder 'vendor/assets/javascripts' do
file 'jquery.bbq.js', 'https://raw.github.com/cowboy/jquery-bbq/v1.2.1/jquery.ba-bbq.js'
end

folder 'vendor/assets/stylesheets' do
file 'osmjs.distance-control.css', 'https://raw.github.com/alno/osm-js-libs/leaflet-dev/dist/distance/leaflet-control.css'
file 'distance-icon.png', 'https://raw.github.com/alno/osm-js-libs/leaflet-dev/dist/distance/distance-icon.png'
end

file 'config/mapnik/embossed.xml', 'https://raw.github.com/alno/mapstyle/master/dist/embossed.xml'
file 'config/mapnik/simple.xml', 'https://raw.github.com/alno/mapstyle/master/dist/simple.xml'
5 changes: 3 additions & 2 deletions app/assets/javascripts/app.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

#= require_tree ./modes
#= require_tree ./layers
#= require_tree ./controls

#= require osmjs.distance-control

class @App

Expand Down Expand Up @@ -40,7 +41,7 @@ class @App
setupLayers: ->
@layers =
photos: new App.PhotoLayer()
weather: new OsmJs.Weather.LeafletLayer({lang: I18n.locale})
weather: new OsmJs.Weather.LeafletLayer({lang: I18n.locale, temperatureDigits: 0})

setupModes: ->
@defaultMode = 'search'
Expand Down
75 changes: 0 additions & 75 deletions app/assets/javascripts/controls/distance.js.coffee

This file was deleted.

1 change: 1 addition & 0 deletions app/assets/stylesheets/application.css.sass
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//= require_self
//= require_tree .
//= require osmjs.distance-control
$navbarBackground: #333
$navbarBackgroundHighlight: #666
Expand Down
179 changes: 179 additions & 0 deletions vendor/assets/javascripts/osmjs.distance-control.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit cbc2ab1

Please sign in to comment.