From d3d3ebb5def7fdc8e8bae4e028a794835d7a7645 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Mon, 27 Aug 2012 10:27:19 +0100 Subject: [PATCH] added new buttons for map zooming and requesting important locations --- WebContent/base/OSRM.Map.js | 17 +- .../base/leaflet/L.Control.Locations.js | 65 ------ .../base/leaflet/L.Control.QueryableLayers.js | 14 +- WebContent/base/leaflet/L.Control.Zoom.js | 63 ------ .../base/osrm/OSRM.Control.Locations.js | 65 ++++++ WebContent/base/osrm/OSRM.Control.Zoom.js | 73 +++++++ WebContent/gui/OSRM.MainGUI.js | 14 +- WebContent/gui/OSRM.RoutingGUI.js | 6 +- .../images/{control_layers.png => layers.png} | Bin ...rol_zoom_route.png => locations_route.png} | Bin WebContent/images/locations_route_active.png | Bin 0 -> 709 bytes WebContent/images/locations_route_hover.png | Bin 0 -> 682 bytes ...ntrol_zoom_user.png => locations_user.png} | Bin WebContent/images/locations_user_active.png | Bin 0 -> 1102 bytes WebContent/images/locations_user_hover.png | Bin 0 -> 1146 bytes WebContent/images/{ => raw}/controls.pdf | Bin WebContent/images/zoom_in.png | Bin 0 -> 163 bytes WebContent/images/zoom_in_active.png | Bin 0 -> 169 bytes WebContent/images/zoom_in_hover.png | Bin 0 -> 165 bytes WebContent/images/zoom_out.png | Bin 0 -> 153 bytes WebContent/images/zoom_out_active.png | Bin 0 -> 156 bytes WebContent/images/zoom_out_hover.png | Bin 0 -> 155 bytes WebContent/main.css | 187 +++++++----------- WebContent/main.html | 5 +- WebContent/main.js | 83 +++++--- 25 files changed, 302 insertions(+), 290 deletions(-) delete mode 100644 WebContent/base/leaflet/L.Control.Locations.js delete mode 100644 WebContent/base/leaflet/L.Control.Zoom.js create mode 100644 WebContent/base/osrm/OSRM.Control.Locations.js create mode 100644 WebContent/base/osrm/OSRM.Control.Zoom.js rename WebContent/images/{control_layers.png => layers.png} (100%) rename WebContent/images/{control_zoom_route.png => locations_route.png} (100%) create mode 100644 WebContent/images/locations_route_active.png create mode 100644 WebContent/images/locations_route_hover.png rename WebContent/images/{control_zoom_user.png => locations_user.png} (100%) create mode 100644 WebContent/images/locations_user_active.png create mode 100644 WebContent/images/locations_user_hover.png rename WebContent/images/{ => raw}/controls.pdf (100%) create mode 100644 WebContent/images/zoom_in.png create mode 100644 WebContent/images/zoom_in_active.png create mode 100644 WebContent/images/zoom_in_hover.png create mode 100644 WebContent/images/zoom_out.png create mode 100644 WebContent/images/zoom_out_active.png create mode 100644 WebContent/images/zoom_out_hover.png diff --git a/WebContent/base/OSRM.Map.js b/WebContent/base/OSRM.Map.js index 1ae79092b..8982f7f24 100644 --- a/WebContent/base/OSRM.Map.js +++ b/WebContent/base/OSRM.Map.js @@ -52,20 +52,23 @@ init: function() { zoom: OSRM.DEFAULTS.ONLOAD_ZOOM_LEVEL, layers: [base_maps[tile_servers[0].display_name]], zoomAnimation: false, // animations have to be inactive during initialization (leaflet issue #918) - fadeAnimation: false + fadeAnimation: false, + zoomControl: false // use OSRM zoom buttons }); -// // add locations control -// var locationsControl = new L.Control.Locations(); -// OSRM.G.map.addControl(locationsControl); + // add locations control + var locationsControl = new OSRM.Control.Locations(); + OSRM.G.map.addControl(locationsControl); // add layer control var layerControl = new L.Control.QueryableLayers(base_maps, {}); OSRM.G.map.addLayerControl(layerControl); - // move zoom markers - OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom')[0].style.left=(OSRM.G.main_handle.boxWidth()+10)+"px"; - OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom')[0].style.top="5px"; + // add zoom control + var zoomControl = new OSRM.Control.Zoom(); + OSRM.G.map.addControl(zoomControl); + zoomControl.show(); + // add scale control OSRM.G.map.scaleControl = new L.Control.Scale(); diff --git a/WebContent/base/leaflet/L.Control.Locations.js b/WebContent/base/leaflet/L.Control.Locations.js deleted file mode 100644 index ae7f631e3..000000000 --- a/WebContent/base/leaflet/L.Control.Locations.js +++ /dev/null @@ -1,65 +0,0 @@ -/* -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU AFFERO General Public License as published by -the Free Software Foundation; either version 3 of the License, or -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -or see http://www.gnu.org/licenses/agpl.txt. -*/ - -// locations control -// [buttons to important locations - zoom on route, zoom on user] -L.Control.Locations = L.Control.extend({ - options: { - position: 'topright' - }, - - onAdd: function (map) { - var className = 'leaflet-control-locations', - container = L.DomUtil.create('div', className); - - this._createButton('Goto Location', className + '-user', container, OSRM.GUI.zoomOnUser, map); - this._createButton('Goto Route', className + '-route', container, OSRM.GUI.zoomOnRoute, map); - - return container; - }, - - _createButton: function (title, className, container, fn, context) { - var link = L.DomUtil.create('a', className, container); - link.id = className; - link.title = title; - - L.DomEvent - .on(link, 'click', L.DomEvent.stopPropagation) - .on(link, 'click', L.DomEvent.preventDefault) - .on(link, 'click', fn, context) - .on(link, 'mousedown', function() { this.className = this.id + "-active"; } ) - .on(link, 'mouseup', function() { this.className = this.id + ""; } ) - .on(link, 'dblclick', L.DomEvent.stopPropagation); - - return link; - } -}); - -L.Map.mergeOptions({ - locationsControl: false -}); - -L.Map.addInitHook(function () { - if (this.options.locationsControl) { - this.locationsControl = new L.Control.Locations(); - this.addControl(this.locationsControl); - } -}); - -L.control.locations = function (options) { - return new L.Control.Locations(options); -}; \ No newline at end of file diff --git a/WebContent/base/leaflet/L.Control.QueryableLayers.js b/WebContent/base/leaflet/L.Control.QueryableLayers.js index 3ebd40571..7af74a738 100644 --- a/WebContent/base/leaflet/L.Control.QueryableLayers.js +++ b/WebContent/base/leaflet/L.Control.QueryableLayers.js @@ -16,10 +16,10 @@ or see http://www.gnu.org/licenses/agpl.txt. */ // queryable Layers control -// [simply Control.Layers extended by query functions] +// [extension of Layers.Control with OSRM styling and additional query methods] L.Control.QueryableLayers = L.Control.Layers.extend({ -// new query functionality +// query functionality getActiveLayerName: function () { var i, input, obj, inputs = this._form.getElementsByTagName('input'), @@ -45,5 +45,15 @@ getActiveLayer: function () { return obj.layer; } } +}, + + +// overwrite Control.Layers methods to get OSRM styling +_expand: function () { + L.DomUtil.addClass(this._container, 'leaflet-control-layers-expanded'); +}, +_collapse: function () { + this._container.className = this._container.className.replace(' leaflet-control-layers-expanded', ''); } + }); diff --git a/WebContent/base/leaflet/L.Control.Zoom.js b/WebContent/base/leaflet/L.Control.Zoom.js deleted file mode 100644 index 1cdf06ac0..000000000 --- a/WebContent/base/leaflet/L.Control.Zoom.js +++ /dev/null @@ -1,63 +0,0 @@ -/* -This program is free software; you can redistribute it and/or modify -it under the terms of the GNU AFFERO General Public License as published by -the Free Software Foundation; either version 3 of the License, or -any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU Affero General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -or see http://www.gnu.org/licenses/agpl.txt. -*/ - -// zoom control -// [control moves with sidebar and changes color when clicked] -L.Control.Zoom = L.Control.extend({ - options: { - position: 'topleft' - }, - - onAdd: function (map) { - var className = 'leaflet-control-zoom', - container = L.DomUtil.create('div', className); - - this._createButton('Zoom in', className + '-in', container, map.zoomIn, map); - this._createButton('Zoom out', className + '-out', container, map.zoomOut, map); - - return container; - }, - - _createButton: function (title, className, container, fn, context) { - var link = L.DomUtil.create('a', className, container); - link.href = '#'; - link.title = title; - - L.DomEvent - .on(link, 'click', L.DomEvent.stopPropagation) - .on(link, 'click', L.DomEvent.preventDefault) - .on(link, 'click', fn, context) - .on(link, 'dblclick', L.DomEvent.stopPropagation); - - return link; - } -}); - -L.Map.mergeOptions({ - zoomControl: true -}); - -L.Map.addInitHook(function () { - if (this.options.zoomControl) { - this.zoomControl = new L.Control.Zoom(); - this.addControl(this.zoomControl); - } -}); - -L.control.zoom = function (options) { - return new L.Control.Zoom(options); -}; \ No newline at end of file diff --git a/WebContent/base/osrm/OSRM.Control.Locations.js b/WebContent/base/osrm/OSRM.Control.Locations.js new file mode 100644 index 000000000..16ab3442a --- /dev/null +++ b/WebContent/base/osrm/OSRM.Control.Locations.js @@ -0,0 +1,65 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// locations control +// [navigation buttons for important locations - zoom on route, zoom on user] +OSRM.Control = OSRM.Control || {}; +OSRM.Control.Locations = L.Control.extend({ + options: { + position: 'topright' + }, + + onAdd: function (map) { + // unique control + if( document.getElementById('gui-control-locations') ) + return document.getElementById('gui-control-locations'); + + // create wrapper + var container = L.DomUtil.create('div', 'box-wrapper gui-control-wrapper'); + container.id = 'gui-control-locations'; + L.DomEvent.disableClickPropagation(container); + + // create buttons + this._createButton('gui-locations-user', container, OSRM.GUI.zoomOnUser, map, navigator.geolocation ); + this._createButton('gui-locations-route', container, OSRM.GUI.zoomOnRoute, map, false); + + return container; + }, + + _createButton: function (id, container, fn, context, isActive) { + var inactive = (isActive == false) ? "-inactive" : ""; + var classNames = "box-content" + " " + "gui-control"+inactive + " " + id+inactive; + var link = L.DomUtil.create('a', classNames, container); + link.id = id; + link.title = id; + + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, 'click', fn, context) + .on(link, 'dblclick', L.DomEvent.stopPropagation); + + return link; + }, + + activate: function (id) { + document.getElementById(id).className = "box-content gui-control " + id; + }, + deactivate: function (id) { + document.getElementById(id).className = "box-content gui-control-inactive " + id + "-inactive"; + } +}); diff --git a/WebContent/base/osrm/OSRM.Control.Zoom.js b/WebContent/base/osrm/OSRM.Control.Zoom.js new file mode 100644 index 000000000..af1500597 --- /dev/null +++ b/WebContent/base/osrm/OSRM.Control.Zoom.js @@ -0,0 +1,73 @@ +/* +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU AFFERO General Public License as published by +the Free Software Foundation; either version 3 of the License, or +any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +or see http://www.gnu.org/licenses/agpl.txt. +*/ + +// zoom control +// [modified zoom control with ids, prevention of click propagation, show/hide with respect to main OSRM window] +OSRM.Control = OSRM.Control || {}; +OSRM.Control.Zoom = L.Control.extend({ + options: { + position: 'topleft' + }, + + onAdd: function (map) { + // unique control + if( document.getElementById('gui-control-zoom') ) + return document.getElementById('gui-control-zoom'); + + // create wrapper + var container = L.DomUtil.create('div', 'box-wrapper gui-control-wrapper'); + container.id = 'gui-control-zoom'; + L.DomEvent.disableClickPropagation(container); + + // create buttons + this._createButton('gui-zoom-in', container, map.zoomIn, map, true); + this._createButton('gui-zoom-out', container, map.zoomOut, map, true); + + return container; + }, + + _createButton: function (id, container, fn, context, isActive) { + var inactive = (isActive == false) ? "-inactive" : ""; + var classNames = "box-content" + " " + "gui-control"+inactive + " " + id+inactive; + var link = L.DomUtil.create('a', classNames, container); + link.id = id; + link.title = id; + + L.DomEvent + .on(link, 'click', L.DomEvent.stopPropagation) + .on(link, 'click', L.DomEvent.preventDefault) + .on(link, 'click', fn, context) + .on(link, 'dblclick', L.DomEvent.stopPropagation); + + return link; + }, + + hide: function() { + var zoom_controls = document.getElementById("gui-control-zoom"); + if( zoom_controls ) + zoom_controls.style.visibility="hidden"; + }, + + show: function() { + var zoom_controls = document.getElementById("gui-control-zoom"); + if( zoom_controls ) { + zoom_controls.style.top = "5px"; + zoom_controls.style.left = ( OSRM.G.main_handle.boxVisible() == true ? (OSRM.G.main_handle.boxWidth()+10) : "30") + "px"; + zoom_controls.style.visibility="visible"; + } + } +}); diff --git a/WebContent/gui/OSRM.MainGUI.js b/WebContent/gui/OSRM.MainGUI.js index 1eaab3c99..6eb85315f 100644 --- a/WebContent/gui/OSRM.MainGUI.js +++ b/WebContent/gui/OSRM.MainGUI.js @@ -71,6 +71,10 @@ setLabels: function() { document.getElementById('config-handle-icon').title = OSRM.loc("GUI_CONFIGURATION"); document.getElementById('mapping-handle-icon').title = OSRM.loc("GUI_MAPPING_TOOLS"); document.getElementById('main-handle-icon').title = OSRM.loc("GUI_MAIN_WINDOW"); + document.getElementById('gui-locations-route').title = OSRM.loc("GUI_ZOOM_ON_ROUTE"); + document.getElementById('gui-locations-user').title = OSRM.loc("GUI_ZOOM_ON_USER"); + document.getElementById('gui-zoom-in').title = OSRM.loc("GUI_ZOOM_IN"); + document.getElementById('gui-zoom-out').title = OSRM.loc("GUI_ZOOM_OUT"); OSRM.GUI.setDistanceFormatsLanguage(); OSRM.GUI.setRoutingEnginesLanguage(); }, @@ -83,17 +87,11 @@ clearResults: function() { // reposition and hide zoom controls before main box animation beforeMainTransition: function() { - var zoom_controls = OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom'); - if( zoom_controls.length > 0) - zoom_controls[0].style.visibility="hidden"; + OSRM.Control.Zoom.prototype.hide(); }, // show zoom controls after main box animation afterMainTransition: function() { - var zoom_controls = OSRM.Browser.getElementsByClassName(document,'leaflet-control-zoom'); - if( zoom_controls.length > 0) { - zoom_controls[0].style.left = ( OSRM.G.main_handle.boxVisible() == true ? (OSRM.G.main_handle.boxWidth()+10) : "30") + "px"; - zoom_controls[0].style.visibility="visible"; - } + OSRM.Control.Zoom.prototype.show(); }, // distance format routines diff --git a/WebContent/gui/OSRM.RoutingGUI.js b/WebContent/gui/OSRM.RoutingGUI.js index 5650fe1de..25b86a5c5 100644 --- a/WebContent/gui/OSRM.RoutingGUI.js +++ b/WebContent/gui/OSRM.RoutingGUI.js @@ -46,13 +46,11 @@ init: function() { // toggle GUI features that need a route to work activateRouteFeatures: function() { OSRM.Printing.activate(); -// document.getElementById("gui-zoom").className = "button"; -// document.getElementById('leaflet-control-locations-route').className = "leaflet-control-locations-route"; + OSRM.Control.Locations.prototype.activate('gui-locations-route'); }, deactivateRouteFeatures: function() { OSRM.Printing.deactivate(); -// document.getElementById("gui-zoom").className = "button-inactive"; -// document.getElementById('leaflet-control-locations-route').className = "leaflet-control-locations-route-inactive"; + OSRM.Control.Locations.prototype.deactivate('gui-locations-route'); }, // click: button "reset" diff --git a/WebContent/images/control_layers.png b/WebContent/images/layers.png similarity index 100% rename from WebContent/images/control_layers.png rename to WebContent/images/layers.png diff --git a/WebContent/images/control_zoom_route.png b/WebContent/images/locations_route.png similarity index 100% rename from WebContent/images/control_zoom_route.png rename to WebContent/images/locations_route.png diff --git a/WebContent/images/locations_route_active.png b/WebContent/images/locations_route_active.png new file mode 100644 index 0000000000000000000000000000000000000000..44315410c6f2b90987279f322c7d22a242219834 GIT binary patch literal 709 zcmV;$0y_PPP)HP>lL<#Ldm}`}gmUqN1W_SXo(LD;OGP zGR&O$hct`Mp5+9Rc$4|-wQH;S`T5Vwy?SLKBO`PD_p4VQNJ$G|i!NGNtYDZpQ52^t z6BGZBA3xfOX=qdcdH>$Oe}9gNiAk3fi&#L!pFe*@L4l4UQ&7PFe)HydAWP=et5>e- z78bD#yLNp8NhzzS?7Dg5Mu<8C!wQlt0)vkq#Tcecfpgz(+}Ql!!GlClkn-^GTxC#F zdIXo`;J68lD{Y4KbQWUc32xDa`uaJ4|Ni|A;{zjHn*kbcKp)HhK5;^bm4V?CSn}}U zhtD`T{tIz)gEH2Q2ZYVKar4F_rJcL16lr^l2Xr0 zS=o4E^AQU!2XI`u(rp|Rw3FfOTQP=%2lt@M1ATu47_Htw<|0yjRQtcbUx1V%<^R&9 zf|uFZ&jZ;kIMqyX8e^ivzzkmNwN(*4h<)YXk zpdoKyY(_@LAHd+*`ts$=SIBCBMU@bc%7rHevT#9x=zA<2tsj0QDPv7 rsgf9o0dL-bf-(pkyrZq4L2nTN8KI3ZC6Fr100000NkvXXu0mjfrVK#O literal 0 HcmV?d00001 diff --git a/WebContent/images/locations_route_hover.png b/WebContent/images/locations_route_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..a0c6c4fc073d73a24e05d21e8941c4be39a149e0 GIT binary patch literal 682 zcmV;b0#*HqP)Dmt%UzexE})XBQTo;y~O+IeHbgl zvuCXgU%$!$u`HMk5~F(12@3vaU}k;?=Y!ZFG3v(=Hw(k>-ya!7Mb9v>vc6_8G|XgR znE8i9i_UTa3H-@?$J%NJe*W_efv+qWWMr;0yn6M4ct^r4nrE?sfnlO3PE}`3{24xe zv}4fFr~vZ*F}#0&j)93umlTUwz~rAlqM$%Wl`7z8*t0nv$dCcL-j%_^B9=jM*Eg_~ zipnmA8#h82%otXXW)T>C1m=w?2=12( z8&3#}=GM<)`1|)aoX^Ut%>awHKY!#IPMi>8uweKE=4%~($Z(ninBurW8TT1cUIJ&R znGDDO|DP;{lF5!}mjT89f$>I(b^rg@bD+rYR_gh`O*Wp`49kMk1=d%(8PtMyGQ52& z#-MR<4~G2Tzej-4>J4NqBE?6w|Nr+3kW?J~Un=;20sDC%n+3O;DLnso$VY%{2+|Bk z!@Cp@{=aVL2xK#1R|AX=aI}z8)}ez3?nVqxo+vY%KD~}%i*zpo!vSV|%2|jt7Xw_p zSP3kWq=1-_;n%M$hRsn@4FCS2mKLn6T$EeH%K8S*W@P*UjDxKVFJHbwQ6nQG1SE42 ziGeI!Ao+iT_=5lIM9=&`s1ZRZjwnkE1Ti%d15w}&C@6!#p*z|N8uS(c0CfsPHzeOY QA^-pY07*qoM6N<$g1O@*$N&HU literal 0 HcmV?d00001 diff --git a/WebContent/images/control_zoom_user.png b/WebContent/images/locations_user.png similarity index 100% rename from WebContent/images/control_zoom_user.png rename to WebContent/images/locations_user.png diff --git a/WebContent/images/locations_user_active.png b/WebContent/images/locations_user_active.png new file mode 100644 index 0000000000000000000000000000000000000000..a3c6d5751428fda512af79f000cdaa26f89ff1ed GIT binary patch literal 1102 zcmV-U1hM;xP)?bQKhc&HKnAO4Jgh z?53!jKu{{BQV0*7OtdVQSxs#jj11N6>}>hG#bUx7wqWUkfJawX7yoH^c#qv~FP6*Y z(uIWuRwNQhSeCUeEiE~eO6Bc!Tee(cy1QSmsRKtohuJLqn3{Uz1%;*U8f!Z;nG$CrBOh`V74bZKLxX~LYknIaf9HWn^x%nHK7l!GSmR-d>(r>NP4w#s zpH4^9$Riq!ED;AN*vIKeSW1SywCh8d!-h3rRvmAn^XPp#>gka_UB7;ic9QG~m{Y4y zTQ_XLQ3!nmS%@`Ycy`htts!VG+uQ~Fv$0Vf6B8q4!o#iZ+;47HQLSuOm6V)9CHSfi zmC<+-7+~F2(jYAfH2IyOurQ7avW$k986VdYMA$U)t#T8L)mqgY%B3G zn?=sC@-B2@2xaU#V1MyvpwH7g11e{>;tY;kPT~<&^>htY>F&YLTYT z^rpoNoK9!*v^h3!E+(N-O5r@bzln?6O1n3>Qa|sRLNNji&pBz3)&CINz6ds~fKJiE*IYS~{n8SuOo)h9i<9l|tVXYPvLha=`foi;tsH!URTUOQ{ z3hqq`_8{i4t;T^14QK^ws+*|V?{me)Ilf{-j&@Py@Anxm;yAga5!5w7?cPAU8YW_C zz$;?KNhvts27e!6R99!xSr5@A*TPj+YUmmWakZop%CvIV)ewR;V1Nb3pWfP6`N4xq zdtYCj!{Ml*HnXT!t8YwBPG%_-ityOj*g>n+YM|>qS}K)ZQ5uciOlzzC&;K*vsjm-b zES99j>1m_QW-E}%WTDh{ZbfUgeT+sk!*q6j4yX}y3|5k%l8&nGcX`2m(O-Ce0g+b3 Ug4r+n$N&HU07*qoM6N<$g1^89N&o-= literal 0 HcmV?d00001 diff --git a/WebContent/images/locations_user_hover.png b/WebContent/images/locations_user_hover.png new file mode 100644 index 0000000000000000000000000000000000000000..79f3525c5c0fbb060add42e7fec58f10e2cc1661 GIT binary patch literal 1146 zcmV-=1cm#FP)|!^&GbU!kUF?cP zmnAboW({Pevc1V^PT%u9 z&pF>Y@AsT9j)>y$KScbJ8NGQ0@V!*@A5PSw$Hf8*Zr`rK$Vi>)OKy=77jx_W+G~Z! zvj7v0J^)+slN`#d)U$R z3Z|!z!DMPxeaT4(MzF$(7V<=zcKt;Y_2jlv*K;jI2Tc(%VU00@6^?KtV6+qcR-a65 z>FspE@jlVnM9uiuwsqt!+pHC1tZ;-Y8Zjqw=6^un*gqv|PSA|~{$@HgqmkNI9#MVG zWXut+X#DF$_v>u*#fl&4Zml&O_)aRXwvjrmKhO#NAe~J1slMc7EEFqT(fH#nTWCJK z7zPI$U^JeEwR1F>8`)t(TU!TLnh~X?yYcw(QCKX;RbO&4CYV47S2W!2hA73*WuP<5 z`*|gfuoZS>enRK7Wh>$%9CExG6HI7cG|nt{DNW52c@AYFBg4R}@rRVSh2ND5l$U=j zYl>8~sIES$FoF$)Xk=t0D$TI>=%_cu2?<#k z9o>o|Tvpi0$(?*o;wEjt6&<_Ac078N#jOHkV?Gqx?{Tgcv$JMAcu6Q zk9zYi5j7?Sb5}O3=jyu1xsdZ|)X%lx|9FKF>_RR{X^Ez$yl3{C=}XJi@HhKAJs+x* zJVjfhy29lbDiubsq0S;&qNync-Di_>0=xy43uj$13!Cjj+`QSuB|LXEbXrSrwYX}& z^o!J(U<4b8IgRV{ni1TaSB^V(4xsMjF5uRBcI&_W@bu| zp8gR^f9_gXTz4Yc8_pp+y9pbwIis1Xj_u_uy0ordvqfXCt|0f?J#0ZvYBlt$zT}?7 z30E{kD~72)&lYlxe%Z1<;+Zt#4K~)dBaR72xS|o$RHgOgZsS#Xm{=M6iU>|psW`%2 z)HM-kd)u2;jf)T86qUgoA%HK_cvu7{gs`YF$ z_mP>|iyJrAA~n^BtgL?c{oD9@UkQWZb5vEI0**~ZQ;Pk~AThJw$R8xRT*}p$nAnV@ zq-AV7-y%Q12X^}~^e6s|C9$}PLZc;a7jkl*!OmY#FNL=BiJmh40eDFQnvgLJ-2eap M07*qoM6N<$f}?aCL;wH) literal 0 HcmV?d00001 diff --git a/WebContent/images/controls.pdf b/WebContent/images/raw/controls.pdf similarity index 100% rename from WebContent/images/controls.pdf rename to WebContent/images/raw/controls.pdf diff --git a/WebContent/images/zoom_in.png b/WebContent/images/zoom_in.png new file mode 100644 index 0000000000000000000000000000000000000000..3ef8cd378ecf106612a3c7cdefca8e74908a8e1b GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1SIo6Pjm-T>?NMQuIzU>B=|VF9jbZzK=K71 zk;M!Q+(IDCc=S{Mf~SjPNX4z> wlmzopr0J5kjtN;K2 literal 0 HcmV?d00001 diff --git a/WebContent/images/zoom_in_active.png b/WebContent/images/zoom_in_active.png new file mode 100644 index 0000000000000000000000000000000000000000..9e7558f6680827817529ccc408f74af6a7c8e627 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1SIo6Pjm-T>?NMQuIzU>B={Jtw1SIo6Pjm-T>?NMQuIzU>B={ID9ZIjUf#eH3 zB8wRqxP?HN@zUM8KR`j2bVpxD28NCO+owsl063-q#sO9ZjpAKWw$5o(t)`QrN>!kT>U%kJV=+PtDnm{r-UW|ZeJ`Q literal 0 HcmV?d00001 diff --git a/WebContent/images/zoom_out.png b/WebContent/images/zoom_out.png new file mode 100644 index 0000000000000000000000000000000000000000..130a3f653acee062c5b81906688f1530147af1c5 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1SIo6Pjm-T>?NMQuIzU>B=|TD+sd!lfaD82 zB8wRqxP?HN@zUM8KR`j2bVpxD28NCO+5immvv4FO#p50BmDpX literal 0 HcmV?d00001 diff --git a/WebContent/images/zoom_out_active.png b/WebContent/images/zoom_out_active.png new file mode 100644 index 0000000000000000000000000000000000000000..58bcc07ea242ed1ae8b16a25efff19ed0d6eae93 GIT binary patch literal 156 zcmeAS@N?(olHy`uVBq!ia0vp^oFL4>1SIo6Pjm-T>?NMQuIzU>B={KAuB5%%1d=cC zh%9Dc;1&X5#!GkW{s0A8(j9#r85lP9bN@+X1@hTSg8YJkG!W!1W1k45Bt2amLn>}1 qCoHf_h*`6;)4Pwe->#-;3j@QVFATq#=0_)j6nnb*xvX1SIo6Pjm-T>?NMQuIzU>B>0$kz1|cSfaD82 zB8wRqxP?HN@zUM8KR`j2bVpxD28NCO+ - @@ -51,6 +50,8 @@ or see http://www.gnu.org/licenses/agpl.txt. + + @@ -153,7 +154,7 @@ or see http://www.gnu.org/licenses/agpl.txt.
- select +
Mapping Tools
diff --git a/WebContent/main.js b/WebContent/main.js index 871e0c51f..4c50aeb96 100644 --- a/WebContent/main.js +++ b/WebContent/main.js @@ -83,6 +83,21 @@ OSRM.prefetchImages = function() { {id:'printer_active', url:'images/printer_active.png'}, {id:'printer_hover', url:'images/printer_hover.png'}, {id:'printer_inactive', url:'images/printer_inactive.png'}, + {id:'zoom_in', url:'images/zoom_in.png'}, + {id:'zoom_in_active', url:'images/zoom_in_active.png'}, + {id:'zoom_in_hover', url:'images/zoom_in_hover.png'}, + {id:'zoom_out', url:'images/zoom_out.png'}, + {id:'zoom_out_active', url:'images/zoom_out_active.png'}, + {id:'zoom_out_hover', url:'images/zoom_out_hover.png'}, + {id:'locations_user', url:'images/locations_user.png'}, + {id:'locations_user_active', url:'images/locations_user_active.png'}, + {id:'locations_user_hover', url:'images/locations_user_hover.png'}, + {id:'locations_user_inactive', url:'images/locations_user_inactive.png'}, + {id:'locations_route', url:'images/locations_route.png'}, + {id:'locations_route_active', url:'images/locations_route_active.png'}, + {id:'locations_route_hover', url:'images/locations_route_hover.png'}, + {id:'locations_route_inactive', url:'images/locations_route_inactive.png'}, + {id:'layers', url:'images/layers.png'}, {id:'direction_0', url:'images/default.png'}, {id:'direction_1', url:'images/continue.png'}, {id:'direction_2', url:'images/slight-right.png'}, @@ -141,37 +156,57 @@ OSRM.prefetchIcons = function() { // set css styles for images OSRM.prefetchCSSIcons = function() { var css_list = [ - { id:'#gui-printer-inactive', image_id:'printer_inactive'}, - { id:'#gui-printer', image_id:'printer'}, - { id:'#gui-printer:hover', image_id:'printer_hover'}, - { id:'#gui-printer:active', image_id:'printer_active'}, + { id:'#gui-printer-inactive', image_id:'printer_inactive'}, + { id:'#gui-printer', image_id:'printer'}, + { id:'#gui-printer:hover', image_id:'printer_hover'}, + { id:'#gui-printer:active', image_id:'printer_active'}, + + { id:'.gui-zoom-in', image_id:'zoom_in'}, + { id:'.gui-zoom-in:hover', image_id:'zoom_in_hover'}, + { id:'.gui-zoom-in:active', image_id:'zoom_in_active'}, - { id:'.cancel-marker', image_id:'cancel'}, - { id:'.cancel-marker:hover', image_id:'cancel_hover'}, - { id:'.cancel-marker:active', image_id:'cancel_active'}, + { id:'.gui-zoom-out', image_id:'zoom_out'}, + { id:'.gui-zoom-out:hover', image_id:'zoom_out_hover'}, + { id:'.gui-zoom-out:active', image_id:'zoom_out_active'}, - { id:'.up-marker', image_id:'up'}, - { id:'.up-marker:hover', image_id:'up_hover'}, - { id:'.up-marker:active', image_id:'up_active'}, + { id:'.gui-locations-user-inactive', image_id:'locations_user_inactive'}, + { id:'.gui-locations-user', image_id:'locations_user'}, + { id:'.gui-locations-user:hover', image_id:'locations_user_hover'}, + { id:'.gui-locations-user:active', image_id:'locations_user_active'}, - { id:'.down-marker', image_id:'down'}, - { id:'.down-marker:hover', image_id:'down_hover'}, - { id:'.down-marker:active', image_id:'down_active'}, + { id:'.gui-locations-route-inactive', image_id:'locations_route_inactive'}, + { id:'.gui-locations-route', image_id:'locations_route'}, + { id:'.gui-locations-route:hover', image_id:'locations_route_hover'}, + { id:'.gui-locations-route:active', image_id:'locations_route_active'}, - { id:'#input-mask-header', image_id:'osrm-logo'}, - { id:'.styled-select', image_id:'selector'}, + { id:'.leaflet-control-layers a', image_id:'layers'}, - { id:'#config-handle-icon', image_id:'config'}, - { id:'#config-handle-icon:hover', image_id:'config_hover'}, - { id:'#config-handle-icon:active', image_id:'config_active'}, + { id:'.cancel-marker', image_id:'cancel'}, + { id:'.cancel-marker:hover', image_id:'cancel_hover'}, + { id:'.cancel-marker:active', image_id:'cancel_active'}, + + { id:'.up-marker', image_id:'up'}, + { id:'.up-marker:hover', image_id:'up_hover'}, + { id:'.up-marker:active', image_id:'up_active'}, + + { id:'.down-marker', image_id:'down'}, + { id:'.down-marker:hover', image_id:'down_hover'}, + { id:'.down-marker:active', image_id:'down_active'}, + + { id:'#input-mask-header', image_id:'osrm-logo'}, + { id:'.styled-select', image_id:'selector'}, + + { id:'#config-handle-icon', image_id:'config'}, + { id:'#config-handle-icon:hover', image_id:'config_hover'}, + { id:'#config-handle-icon:active', image_id:'config_active'}, - { id:'#mapping-handle-icon', image_id:'mapping'}, - { id:'#mapping-handle-icon:hover', image_id:'mapping_hover'}, - { id:'#mapping-handle-icon:active', image_id:'mapping_active'}, + { id:'#mapping-handle-icon', image_id:'mapping'}, + { id:'#mapping-handle-icon:hover', image_id:'mapping_hover'}, + { id:'#mapping-handle-icon:active', image_id:'mapping_active'}, - { id:'#main-handle-icon', image_id:'restore'}, - { id:'#main-handle-icon:hover', image_id:'restore_hover'}, - { id:'#main-handle-icon:active', image_id:'restore_active'} + { id:'#main-handle-icon', image_id:'restore'}, + { id:'#main-handle-icon:hover', image_id:'restore_hover'}, + { id:'#main-handle-icon:active', image_id:'restore_active'} ]; var stylesheet = OSRM.CSS.getStylesheet("main.css");