finalized alternative integration

This commit is contained in:
DennisSchiefer
2012-07-05 09:24:27 +01:00
parent 74154ab0a6
commit ba46d77d1d
11 changed files with 63 additions and 105 deletions
+1 -1
View File
@@ -81,7 +81,7 @@ zoomed: function(e) {
if(OSRM.G.dragging)
OSRM.Routing.getRoute_Dragging();
else
OSRM.Routing.getRoute_Redraw();
OSRM.Routing.getRoute_Redraw({keepAlternative:true});
},
contextmenu: function(e) {;},
mousemove: function(e) { OSRM.Via.drawDragMarker(e); },
+1 -1
View File
@@ -31,7 +31,7 @@ OSRM.Route = function() {
this._old_noroute_style = {dashed:true, color:'#000000', weight:2};
this._unnamed_route_style = {dashed:false, color:'#FF00FF', weight:10};
this._old_unnamed_route_style = {dashed:false, color:'#990099', weight:10};
this._alternative_route_style = {dashed:false,color:'#FF3300', weight:5};
this._alternative_route_style = {dashed:false,color:'#770033', weight:5, opacity:0.6};
this._noroute = OSRM.Route.ROUTE;
this._history = new OSRM.HistoryRoute();
-4
View File
@@ -81,8 +81,6 @@ OSRM.RouteMarker = function ( label, style, position ) {
OSRM.inheritFrom( OSRM.RouteMarker, OSRM.Marker );
OSRM.extend( OSRM.RouteMarker, {
onClick: function(e) {
OSRM.RoutingAlternatives.reset();
for( var i=0; i<OSRM.G.markers.route.length; i++) {
if( OSRM.G.markers.route[i].marker === this ) {
OSRM.G.markers.removeMarker( i );
@@ -104,8 +102,6 @@ onDragStart: function(e) {
OSRM.G.dragging = true;
this.switchIcon(this.options.dragicon);
OSRM.RoutingAlternatives.reset();
// store id of dragged marker
for( var i=0; i<OSRM.G.markers.route.length; i++)
if( OSRM.G.markers.route[i].marker === this ) {