diff --git a/WebContent/base/leaflet/L.Control.Layers.js b/WebContent/base/leaflet/L.Control.Layers.js deleted file mode 100644 index b968b1aab..000000000 --- a/WebContent/base/leaflet/L.Control.Layers.js +++ /dev/null @@ -1,205 +0,0 @@ - -L.Control.Layers = L.Control.extend({ - options: { - collapsed: true, - position: 'topright', - autoZIndex: true - }, - - initialize: function (baseLayers, overlays, options) { - L.Util.setOptions(this, options); - - this._layers = {}; - this._lastZIndex = 0; - - for (var i in baseLayers) { - if (baseLayers.hasOwnProperty(i)) { - this._addLayer(baseLayers[i], i); - } - } - - for (i in overlays) { - if (overlays.hasOwnProperty(i)) { - this._addLayer(overlays[i], i, true); - } - } - }, - - onAdd: function (map) { - this._initLayout(); - this._update(); - - return this._container; - }, - - addBaseLayer: function (layer, name) { - this._addLayer(layer, name); - this._update(); - return this; - }, - - addOverlay: function (layer, name) { - this._addLayer(layer, name, true); - this._update(); - return this; - }, - - removeLayer: function (layer) { - var id = L.Util.stamp(layer); - delete this._layers[id]; - this._update(); - return this; - }, - - _initLayout: function () { - var className = 'leaflet-control-layers', - container = this._container = L.DomUtil.create('div', className); - - if (!L.Browser.touch) { - L.DomEvent.disableClickPropagation(container); - } else { - L.DomEvent.on(container, 'click', L.DomEvent.stopPropagation); - } - - var form = this._form = L.DomUtil.create('form', className + '-list'); - - if (this.options.collapsed) { - L.DomEvent - .on(container, 'mouseover', this._expand, this) - .on(container, 'mouseout', this._collapse, this); - - var link = this._layersLink = L.DomUtil.create('a', className + '-toggle', container); - link.href = '#'; - link.title = 'Layers'; - - if (L.Browser.touch) { - L.DomEvent - .on(link, 'click', L.DomEvent.stopPropagation) - .on(link, 'click', L.DomEvent.preventDefault) - .on(link, 'click', this._expand, this); - } - else { - L.DomEvent.on(link, 'focus', this._expand, this); - } - - this._map.on('movestart', this._collapse, this); - // TODO keyboard accessibility - } else { - this._expand(); - } - - this._baseLayersList = L.DomUtil.create('div', className + '-base', form); - this._separator = L.DomUtil.create('div', className + '-separator', form); - this._overlaysList = L.DomUtil.create('div', className + '-overlays', form); - - container.appendChild(form); - }, - - _addLayer: function (layer, name, overlay) { - var id = L.Util.stamp(layer); - - this._layers[id] = { - layer: layer, - name: name, - overlay: overlay - }; - - if (this.options.autoZIndex && layer.setZIndex) { - this._lastZIndex++; - layer.setZIndex(this._lastZIndex); - } - }, - - _update: function () { - if (!this._container) { - return; - } - - this._baseLayersList.innerHTML = ''; - this._overlaysList.innerHTML = ''; - - var baseLayersPresent = false, - overlaysPresent = false; - - for (var i in this._layers) { - if (this._layers.hasOwnProperty(i)) { - var obj = this._layers[i]; - this._addItem(obj); - overlaysPresent = overlaysPresent || obj.overlay; - baseLayersPresent = baseLayersPresent || !obj.overlay; - } - } - - this._separator.style.display = (overlaysPresent && baseLayersPresent ? '' : 'none'); - }, - - // IE7 bugs out if you create a radio dynamically, so you have to do it this hacky way (see http://bit.ly/PqYLBe) - _createRadioElement: function (name, checked) { - - var radioHtml = ' workaround for invisible scrollbars in Chrome */ -#information-box::-webkit-scrollbar { +#information-box::-webkit-scrollbar +{ height: 10px; width: 10px; } -#information-box::-webkit-scrollbar-track { +#information-box::-webkit-scrollbar-track +{ background: #FFFFFF; } -#information-box::-webkit-scrollbar-thumb { +#information-box::-webkit-scrollbar-thumb +{ min-height: 30px; background: #EEEEEE; border: 1px solid #999999; -webkit-border-radius: 5ex; } -#information-box::-webkit-scrollbar-thumb:hover { +#information-box::-webkit-scrollbar-thumb:hover +{ background: #F9F9F9; } -#information-box::-webkit-scrollbar-thumb:active { +#information-box::-webkit-scrollbar-thumb:active +{ background: #F4F4F4; } @@ -520,10 +499,22 @@ html, body { right: 5px; /* equal to box-content padding */ bottom: 5px; } -.mapping-checkbox +#mapping-checkboxes { - margin: 0px 5px 3px 5px; + margin-top: -2px; +} +#mapping-checkboxes input +{ + cursor:pointer; + position: relative; + margin: 0px 5px 5px 5px; padding: 0px; + top: 3px; +} +#mapping-checkboxes label +{ + display: block; + vertical-align:middle; } .mapping-button { @@ -537,10 +528,12 @@ html, body { /* ------------------------------------------------------------------------ */ /* map buttons */ -.gui-control-wrapper { +.gui-control-wrapper +{ position:relative; } -.gui-control { +.gui-control +{ cursor:pointer; position:relative; background-position: 50% 50%; @@ -551,12 +544,14 @@ html, body { /* zoom buttons */ .gui-zoom-in, -.gui-zoom-out { +.gui-zoom-out +{ width: 15px; height: 15px; } .leaflet-touch .gui-zoom-in, -.leaflet-touch .gui-zoom-out { +.leaflet-touch .gui-zoom-out +{ width: 23px; height: 23px; } @@ -566,7 +561,8 @@ html, body { .gui-locations-user, .gui-locations-route, .gui-locations-user-inactive, -.gui-locations-route-inactive { +.gui-locations-route-inactive +{ float:left; width: 26px; height: 26px; @@ -574,11 +570,57 @@ html, body { .leaflet-touch .gui-locations-user, .leaflet-touch .gui-locations-route, .leaflet-touch .gui-locations-user-inactive, -.leaflet-touch .gui-locations-route-inactive { +.leaflet-touch .gui-locations-route-inactive +{ width: 32px; height: 32px; } + +/* layer selection */ +.gui-layers +{ + width: 26px; + height: 26px; +} +.leaflet-touch .gui-layers +{ + width: 32px; + height: 32px; +} +.gui-layers-expanded .gui-layers +{ + display: none; +} + +.gui-layers-list +{ + display: none; +} +.gui-layers-expanded .gui-layers-list +{ + display: block; + position: relative; +} +.gui-layers-list input +{ + margin-top: 2px; + position: relative; + top: 2px; +} +.gui-layers-list label +{ + display: block; + vertical-align:middle; +} + +.gui-layers-separator +{ + height: 0; + border-top: 1px solid #ddd; + margin: 5px -10px 5px -6px; +} + /* ------------------------------------------------------------------------ */ /* buttons */ @@ -676,17 +718,6 @@ html, body { overflow: hidden; } - -/* checkboxes */ -input[type=checkbox], -{ - cursor:pointer; -} -.checkbox-label -{ - vertical-align:2px; -} - /* ------------------------------------------------------------------------ */ /* utility styles */ @@ -738,88 +769,27 @@ input[type=checkbox], /* ------------------------------------------------------------------------ */ /* fonts */ -.base-font { +.base-font +{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 12px; font-weight: normal; } -.big-font { +.big-font +{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; } -.medium-font { +.medium-font +{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10.5px; - font-weight: normal; + font-weight: normal; } -.small-font { +.small-font +{ font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 9px; font-weight: normal; } - - - - - - -/* .leaflet-control-layers { - box-shadow: 0 1px 7px #999; - background: #f8f8f9; - -moz-border-radius: 8px; - -webkit-border-radius: 8px; - border-radius: 8px; - } -.leaflet-touch .leaflet-control-layers { - box-shadow: none; - border: 5px solid #bbb; - } - - -.leaflet-control-layers a { - background-position: 50% 50%; - background-repeat: no-repeat; - display: block; - background-image: url(images/layers.png); - width: 36px; - height: 36px; - } -.leaflet-touch .leaflet-control-layers a { - width: 44px; - height: 44px; - } - - -.leaflet-control-layers .leaflet-control-layers-list, -.leaflet-control-layers-expanded .leaflet-control-layers-toggle { - display: none; - } -.leaflet-control-layers-expanded .leaflet-control-layers-list { - display: block; - position: relative; - } - - - -.leaflet-control-layers-expanded { - padding: 6px 10px 6px 6px; - font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif; - color: #333; - background: #fff; - } - - -.leaflet-control-layers input { - margin-top: 2px; - position: relative; - top: 1px; - } -.leaflet-control-layers label { - display: block; - } -.leaflet-control-layers-separator { - height: 0; - border-top: 1px solid #ddd; - margin: 5px -10px 5px -6px; - } */ \ No newline at end of file diff --git a/WebContent/main.html b/WebContent/main.html index 5a7580e8b..53ceb9798 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -158,17 +158,21 @@ or see http://www.gnu.org/licenses/agpl.txt.
Mapping Tools
- -
-
-
-
Highlight unnamed streets
-
-
-
-
Show previous routes
-
+ +
+
+ +
+
+ + OSM BugsJOSM
diff --git a/WebContent/main.js b/WebContent/main.js index 4c50aeb96..e2a898a1b 100644 --- a/WebContent/main.js +++ b/WebContent/main.js @@ -179,7 +179,7 @@ OSRM.prefetchCSSIcons = function() { { id:'.gui-locations-route:hover', image_id:'locations_route_hover'}, { id:'.gui-locations-route:active', image_id:'locations_route_active'}, - { id:'.leaflet-control-layers a', image_id:'layers'}, + { id:'.gui-layers', image_id:'layers'}, { id:'.cancel-marker', image_id:'cancel'}, { id:'.cancel-marker:hover', image_id:'cancel_hover'},