Support beelines in hash url (first stab)
This commit is contained in:
parent
f3d48dc63e
commit
3c8be96085
5 changed files with 50 additions and 10 deletions
|
|
@ -341,7 +341,7 @@ BR.routeLoader = function (map, layersControl, routing, pois) {
|
|||
}
|
||||
|
||||
if (routingPoints.length > 0) {
|
||||
routing.setWaypoints(routingPoints, function (event) {
|
||||
routing.setWaypoints(routingPoints, null, function (event) {
|
||||
if (!event) return;
|
||||
var err = event.error;
|
||||
BR.message.showError(
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ BR.Routing = L.Routing.extend({
|
|||
}
|
||||
},
|
||||
|
||||
setWaypoints: function (latLngs, cb) {
|
||||
setWaypoints: function (latLngs, beelineFlags, cb) {
|
||||
var i;
|
||||
var callbackCount = 0;
|
||||
var firstErr;
|
||||
|
|
@ -319,7 +319,8 @@ BR.Routing = L.Routing.extend({
|
|||
this._loadingTrailerGroup._map = null;
|
||||
|
||||
for (i = 0; latLngs && i < latLngs.length; i++) {
|
||||
this.addWaypoint(latLngs[i], this._waypoints._last, null, callback);
|
||||
const beeline = beelineFlags && i < beelineFlags.length ? beelineFlags[i] : null;
|
||||
this.addWaypoint(latLngs[i], beeline, this._waypoints._last, null, callback);
|
||||
}
|
||||
|
||||
this._loadingTrailerGroup._map = this._map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue