diff --git a/WebContent/base/OSRM.Markers.js b/WebContent/base/OSRM.Markers.js index 7bc5d7a3b..548943572 100644 --- a/WebContent/base/OSRM.Markers.js +++ b/WebContent/base/OSRM.Markers.js @@ -21,6 +21,7 @@ or see http://www.gnu.org/licenses/agpl.txt. OSRM.Markers = function() { this.route = new Array(); this.highlight = new OSRM.DragMarker("highlight", {zIndexOffset:-1,draggable:true,icon:OSRM.G.icons['marker-highlight'],dragicon:OSRM.G.icons['marker-highlight-drag']});; + this.hover = new OSRM.Marker("hover", {zIndexOffset:-1,draggable:false,icon:OSRM.G.icons['marker-highlight']});; this.dragger = new OSRM.DragMarker("drag", {draggable:true,icon:OSRM.G.icons['marker-drag'],dragicon:OSRM.G.icons['marker-drag']});; }; OSRM.extend( OSRM.Markers,{ diff --git a/WebContent/routing/OSRM.RoutingDescription.js b/WebContent/routing/OSRM.RoutingDescription.js index afc1ad516..2bc47b7d7 100644 --- a/WebContent/routing/OSRM.RoutingDescription.js +++ b/WebContent/routing/OSRM.RoutingDescription.js @@ -35,6 +35,14 @@ uninit: function() { }, // route description events +onMouseOverRouteDescription: function(lat, lng) { + OSRM.G.markers.hover.setPosition( new L.LatLng(lat, lng) ); + OSRM.G.markers.hover.show(); + +}, +onMouseOutRouteDescription: function(lat, lng) { + OSRM.G.markers.hover.hide(); +}, onClickRouteDescription: function(lat, lng) { OSRM.G.markers.highlight.setPosition( new L.LatLng(lat, lng) ); OSRM.G.markers.highlight.show(); @@ -104,7 +112,10 @@ show: function(response) { body += '