finalized alternative integration
This commit is contained in:
@@ -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); },
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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 ) {
|
||||
|
||||
Reference in New Issue
Block a user