diff --git a/assets/javascripts/main.coffee b/assets/javascripts/main.coffee
index 12590f8..5a40b1c 100644
--- a/assets/javascripts/main.coffee
+++ b/assets/javascripts/main.coffee
@@ -15,26 +15,29 @@ require ["jquery", "foundation"], ($) ->
$(document).ready ()->
$(document).foundation()
-require ["jquery", "leaflet"], ()->
- $(document).ready ()->
- map = L.map('map', {dragging: false}).setView([33.215194, -97.132788], 15)
+require ["leaflet"], ()->
+
+ map = L.map('map', {dragging: false}).setView([33.215194, -97.132788], 15)
- L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
- attribution: "Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade"
- maxZoom: 18
- ).addTo map
+ L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
+ attribution: "Map data © OpenStreetMap contributors, CC-BY-SA, Imagery © CloudMade"
+ maxZoom: 18
+ ).addTo map
- map.locate({setView: true, maxZoom: 17})
- map.locate({watch: true, maximumAge: 6000, setView: true})
+ map.locate({setView: true, maxZoom: 17})
+ map.locate({watch: true, maximumAge: 6000, setView: true})
- circle = L.circle([0, 0], 100 ).addTo(map);
+ options =
+ color: '#00f'
+ circle = L.circle([0, 0], 100, options ).addTo(map);
- onLocationFound = (e) ->
- radius = e.accuracy / 2
- circle.setLatLng(map.getCenter());
+ onLocationFound = (e) ->
+ radius = e.accuracy / 2
+ circle.setLatLng(map.getCenter());
+ circle.setRadius radius
- map.on "locationfound", onLocationFound
+ map.on "locationfound", onLocationFound
- onLocationError = (e) ->
- alert e.message
- map.on "locationerror", onLocationError
+ onLocationError = (e) ->
+ alert e.message
+ map.on "locationerror", onLocationError