set dashArray for non-dashed lines
This commit is contained in:
parent
d9b0ab3d2e
commit
5901b25e69
@ -21,15 +21,15 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
|
|
||||||
OSRM.HistoryRoute = function() {
|
OSRM.HistoryRoute = function() {
|
||||||
// style and count of history routes
|
// style and count of history routes
|
||||||
this._history_styles = [{color:'#FFFFFF', opacity:0.5, weight:5},
|
this._history_styles = [{color:'#FFFFFF', opacity:0.5, weight:5, dashArray:""},
|
||||||
{color:'#0000DD', opacity:0.45, weight:5},
|
{color:'#0000DD', opacity:0.45, weight:5, dashArray:""},
|
||||||
{color:'#0000BB', opacity:0.40, weight:5},
|
{color:'#0000BB', opacity:0.40, weight:5, dashArray:""},
|
||||||
{color:'#000099', opacity:0.35, weight:5},
|
{color:'#000099', opacity:0.35, weight:5, dashArray:""},
|
||||||
{color:'#000077', opacity:0.30, weight:5},
|
{color:'#000077', opacity:0.30, weight:5, dashArray:""},
|
||||||
{color:'#000055', opacity:0.25, weight:5},
|
{color:'#000055', opacity:0.25, weight:5, dashArray:""},
|
||||||
{color:'#000033', opacity:0.20, weight:5},
|
{color:'#000033', opacity:0.20, weight:5, dashArray:""},
|
||||||
{color:'#000011', opacity:0.15, weight:5},
|
{color:'#000011', opacity:0.15, weight:5, dashArray:""},
|
||||||
{color:'#000000', opacity:0.10, weight:5}
|
{color:'#000000', opacity:0.10, weight:5, dashArray:""}
|
||||||
];
|
];
|
||||||
this._history_length = this._history_styles.length;
|
this._history_length = this._history_styles.length;
|
||||||
|
|
||||||
@ -37,7 +37,7 @@ OSRM.HistoryRoute = function() {
|
|||||||
this._history = [];
|
this._history = [];
|
||||||
for(var i=0, size=this._history_length; i<size; i++) {
|
for(var i=0, size=this._history_length; i<size; i++) {
|
||||||
var history = {};
|
var history = {};
|
||||||
history.route = new OSRM.SimpleRoute("current" , {} );
|
history.route = new OSRM.SimpleRoute("current" , {dashArray:""} );
|
||||||
history.markers = [];
|
history.markers = [];
|
||||||
history.checksum = null;
|
history.checksum = null;
|
||||||
this._history.push(history);
|
this._history.push(history);
|
||||||
|
@ -20,18 +20,18 @@ or see http://www.gnu.org/licenses/agpl.txt.
|
|||||||
|
|
||||||
|
|
||||||
OSRM.Route = function() {
|
OSRM.Route = function() {
|
||||||
this._current_route = new OSRM.SimpleRoute("current" , {} );
|
this._current_route = new OSRM.SimpleRoute("current" , {dashArray:""} );
|
||||||
this._alternative_route = new OSRM.SimpleRoute("alternative" , {} );
|
this._alternative_route = new OSRM.SimpleRoute("alternative" , {dashArray:""} );
|
||||||
this._old_route = new OSRM.SimpleRoute("old", {color:"#123"} );
|
this._old_route = new OSRM.SimpleRoute("old", {color:"#123", dashArray:""} );
|
||||||
this._unnamed_route = new OSRM.MultiRoute("unnamed");
|
this._unnamed_route = new OSRM.MultiRoute("unnamed");
|
||||||
|
|
||||||
this._current_route_style = {color:'#0033FF', weight:5};
|
this._current_route_style = {color:'#0033FF', weight:5, dashArray:""};
|
||||||
this._current_noroute_style = {color:'#222222', weight:2, dashArray:"8,6"};
|
this._current_noroute_style = {color:'#222222', weight:2, dashArray:"8,6"};
|
||||||
this._old_route_style = {color:'#112233', weight:5};
|
this._old_route_style = {color:'#112233', weight:5, dashArray:""};
|
||||||
this._old_noroute_style = {color:'#000000', weight:2, dashArray:"8,6"};
|
this._old_noroute_style = {color:'#000000', weight:2, dashArray:"8,6"};
|
||||||
this._unnamed_route_style = {color:'#FF00FF', weight:10};
|
this._unnamed_route_style = {color:'#FF00FF', weight:10, dashArray:""};
|
||||||
this._old_unnamed_route_style = {color:'#990099', weight:10};
|
this._old_unnamed_route_style = {color:'#990099', weight:10, dashArray:""};
|
||||||
this._alternative_route_style = {color:'#770033', weight:5, opacity:0.6};
|
this._alternative_route_style = {color:'#770033', weight:5, opacity:0.6, dashArray:""};
|
||||||
|
|
||||||
this._noroute = OSRM.Route.ROUTE;
|
this._noroute = OSRM.Route.ROUTE;
|
||||||
this._history = new OSRM.HistoryRoute();
|
this._history = new OSRM.HistoryRoute();
|
||||||
|
@ -94,7 +94,7 @@ OSRM.drawRoute = function( positions ) {
|
|||||||
if( OSRM.G.route == undefined )
|
if( OSRM.G.route == undefined )
|
||||||
OSRM.G.route = new L.Polyline();
|
OSRM.G.route = new L.Polyline();
|
||||||
OSRM.G.route.setLatLngs( positions );
|
OSRM.G.route.setLatLngs( positions );
|
||||||
OSRM.G.route.setStyle( {clickable:false,color:'#0033FF', weight:5} );
|
OSRM.G.route.setStyle( {clickable:false,color:'#0033FF', weight:5, dashArray:""} );
|
||||||
OSRM.G.map.addLayer( OSRM.G.route );
|
OSRM.G.map.addLayer( OSRM.G.route );
|
||||||
};
|
};
|
||||||
OSRM.updateRoute = function( positions ) {
|
OSRM.updateRoute = function( positions ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user