Add locate widget to map

This commit is contained in:
Tom MacWright 2013-06-10 11:36:45 -07:00 committed by John Firebaugh
parent a0a18f428f
commit 9bf18a360e
2 changed files with 7 additions and 0 deletions

View file

@ -16,6 +16,10 @@ folder 'vendor/assets' do
folder 'img', 'src/img'
end
from 'git://github.com/domoritz/leaflet-locatecontrol.git' do
file 'leaflet.locate.js', 'src/L.Control.Locate.js'
end
from 'git://github.com/jfirebaugh/leaflet-osm.git' do
file 'leaflet.osm.js', 'leaflet-osm.js'
end

View file

@ -21,6 +21,9 @@ $(document).ready(function () {
OSM.mapUI().addTo(map);
L.control.locate({
position: 'topright'
}).addTo(map);
L.control.scale().addTo(map);
map.attributionControl.setPrefix(permalinks);