This commit is contained in:
John Firebaugh 2013-09-29 15:45:18 -07:00
parent 99775524b3
commit 53e4d600e7
3 changed files with 17 additions and 13 deletions

View file

@ -1,3 +1,5 @@
//= require leaflet.locate
$(document).ready(function () {
var map = L.map("map", {
attributionControl: false,
@ -7,6 +9,13 @@ $(document).ready(function () {
L.OSM.zoom()
.addTo(map);
L.control.locate({
strings: {
title: I18n.t('javascripts.map.locate.title'),
popup: I18n.t('javascripts.map.locate.popup')
}
}).addTo(map);
if (OSM.home) {
map.setView([OSM.home.lat, OSM.home.lon], 12);
} else {

View file

@ -304,6 +304,7 @@ header {
height: $headerHeight;
position: relative;
border-bottom: $keyline;
z-index: 1001;
h1, nav, nav > ul, nav > ul > li, .dropdown {
display: inline-block;
@ -580,13 +581,12 @@ nav.secondary {
border-radius: 4px 0 0 0;
}
.site .leaflet-control .zoomout,
.leaflet-control .zoomout,
.control-key .control-button {
margin-bottom: 0;
border-radius: 0;
}
.leaflet-control .zoomout, // For non-main page maps
.control-locate .control-button,
.control-share .control-button {
border-radius: 0 0 0 4px;
@ -768,6 +768,8 @@ nav.secondary {
/* Rules for the sidebar */
#sidebar {
border-right: $keyline;
.alert {
background: #e00;
}
@ -777,6 +779,10 @@ nav.secondary {
border-bottom: $keyline;
}
h4 {
font-weight: normal;
}
.icon.close {
position: absolute;
right: $lineheight;
@ -1073,12 +1079,6 @@ ul.results-list li { border-bottom: 1px solid #ccc; }
float: right;
}
.content_map #small_map {
height: 100%;
width: 100%;
margin-bottom: $lineheight;
}
/* Rules for the changeset list shown by the history tab etc */

View file

@ -59,11 +59,6 @@ h2, h3, h4 {
min-height: auto;
}
.content_map #small_map {
height: 300px;
border: 1px solid #ccc;
}
.leaflet-control-pan, .leaflet-control-zoomslider {
display: none;
}