update leaflet-routing (rerouteAllSegments merged)
This commit is contained in:
parent
d05bd937f3
commit
aaa1a11709
5 changed files with 13 additions and 13 deletions
|
|
@ -11,7 +11,7 @@
|
|||
"leaflet-gpx": "mpetazzoni/leaflet-gpx",
|
||||
"leaflet-search": "*",
|
||||
"leaflet-plugins": "*",
|
||||
"leaflet-routing": "nrenner/leaflet-routing#reroute",
|
||||
"leaflet-routing": "Turistforeningen/leaflet-routing#gh-pages",
|
||||
"Leaflet.Elevation": "MrMufflon/Leaflet.Elevation#master"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
14
bower_components/leaflet-routing/.bower.json
vendored
14
bower_components/leaflet-routing/.bower.json
vendored
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "leaflet-routing",
|
||||
"homepage": "https://github.com/nrenner/leaflet-routing",
|
||||
"_release": "ac4d02c54b",
|
||||
"homepage": "https://github.com/Turistforeningen/leaflet-routing",
|
||||
"_release": "f78c22ed00",
|
||||
"_resolution": {
|
||||
"type": "branch",
|
||||
"branch": "reroute",
|
||||
"commit": "ac4d02c54b06da9d1e21fe77ba5a0c553095d15e"
|
||||
"branch": "gh-pages",
|
||||
"commit": "f78c22ed001788761b81172ef746a357a92e2f5f"
|
||||
},
|
||||
"_source": "git://github.com/nrenner/leaflet-routing.git",
|
||||
"_target": "reroute",
|
||||
"_originalSource": "nrenner/leaflet-routing"
|
||||
"_source": "git://github.com/Turistforeningen/leaflet-routing.git",
|
||||
"_target": "gh-pages",
|
||||
"_originalSource": "Turistforeningen/leaflet-routing"
|
||||
}
|
||||
2
bower_components/leaflet-routing/README.md
vendored
2
bower_components/leaflet-routing/README.md
vendored
|
|
@ -41,7 +41,7 @@ routing.snapping(true);
|
|||
|
||||
### Recalculate the complete route by routing each segment
|
||||
```javascript
|
||||
routing.routeAllSegments(callback);
|
||||
routing.rerouteAllSegments(callback);
|
||||
```
|
||||
|
||||
### Get first waypoint
|
||||
|
|
|
|||
|
|
@ -306,7 +306,7 @@ L.Routing = L.Control.extend({
|
|||
*
|
||||
* @todo add propper error checking for callback
|
||||
*/
|
||||
,routeAllSegments: function(cb) {
|
||||
,rerouteAllSegments: function(cb) {
|
||||
var numSegments = this.getWaypoints().length - 1;
|
||||
var callbackCount = 0;
|
||||
var $this = this;
|
||||
|
|
@ -314,14 +314,14 @@ L.Routing = L.Control.extend({
|
|||
var callback = function(err, data) {
|
||||
callbackCount++;
|
||||
if (callbackCount >= numSegments) {
|
||||
$this.fire('routing:routeAllSegmentsEnd');
|
||||
$this.fire('routing:rerouteAllSegmentsEnd');
|
||||
if (cb) {
|
||||
cb(err);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$this.fire('routing:routeAllSegmentsStart');
|
||||
$this.fire('routing:rerouteAllSegmentsStart');
|
||||
|
||||
if (numSegments < 1) {
|
||||
return callback(null, true);
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@
|
|||
|
||||
function updateRoute(evt) {
|
||||
router.setOptions(evt.options);
|
||||
routing.routeAllSegments(onUpdate);
|
||||
routing.rerouteAllSegments(onUpdate);
|
||||
}
|
||||
|
||||
routingOptions = new BR.RoutingOptions();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue