Add locate widget to map
This commit is contained in:
parent
a0a18f428f
commit
9bf18a360e
2 changed files with 7 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue