diff --git a/.gitignore b/.gitignore
index 57c0bdc..1acc10c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
bower_components/leaflet-routing/libs/
+bower_components/leaflet-routing/examples/
bower_components/Leaflet.Elevation/*
!bower_components/Leaflet.Elevation/dist/
!bower_components/Leaflet.Elevation/src/
diff --git a/bower_components/leaflet-routing/.bower.json b/bower_components/leaflet-routing/.bower.json
index df1ed87..ba63fa6 100644
--- a/bower_components/leaflet-routing/.bower.json
+++ b/bower_components/leaflet-routing/.bower.json
@@ -1,11 +1,11 @@
{
"name": "leaflet-routing",
"homepage": "https://github.com/Turistforeningen/leaflet-routing",
- "_release": "f78c22ed00",
+ "_release": "2cffb221af",
"_resolution": {
"type": "branch",
"branch": "gh-pages",
- "commit": "f78c22ed001788761b81172ef746a357a92e2f5f"
+ "commit": "2cffb221af25cf624065b9c4d4cfdd299aea5746"
},
"_source": "git://github.com/Turistforeningen/leaflet-routing.git",
"_target": "gh-pages",
diff --git a/bower_components/leaflet-routing/CHANGELOG.md b/bower_components/leaflet-routing/CHANGELOG.md
new file mode 100644
index 0000000..89444d6
--- /dev/null
+++ b/bower_components/leaflet-routing/CHANGELOG.md
@@ -0,0 +1,38 @@
+Changelog
+=========
+
+### 0.2.0 (Unreadlesed)
+
+**Features**
+
+* Add option for overriding draw shortcuts (#23)
+* Add option for disabling drawing marker (#18)
+* Disable shortcuts by setting `options.shortcut` to `false`.
+* Add support for loading GeoJSON without waypoints (#16).
+* Add option to #loadGeoJSON() to disable map fit bounds.
+
+**Breaking changes**
+
+* Default shortcut key for draw enable is `d`
+* Default shortcut key for draw disable is `q`
+
+### 0.1.1 March 11, 2014
+
+**Features**
+
+* Add changelog overview (#14)
+* Add Change map bounds when loading GeoJSON (#13)
+
+**Bugfixes**
+
+* Fix undefined evaluation when snapping layer is not avaiable (#15)
+* Fail gracefully when loading invalid GeoJSON (#12)
+
+### 0.1.0 March 10, 2014
+
+* Implements `#loadGeoJSON()` method (#3)
+
+#### Backwards compability note
+
+* Format of `properties.waypoints` in `#toGeoJSON()` is changed according to #3.
+
diff --git a/bower_components/leaflet-routing/LICENSE b/bower_components/leaflet-routing/LICENSE
index aee5fdd..c01d507 100644
--- a/bower_components/leaflet-routing/LICENSE
+++ b/bower_components/leaflet-routing/LICENSE
@@ -1,22 +1,22 @@
-Copyright (c) 2013, Turistforeningen, Hans Kristian Flaatten
+Copyright (c) 2014, Den Norske Turistforening
All rights reserved.
-Redistribution and use in source and binary forms, with or without modification, are
-permitted provided that the following conditions are met:
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
- 1. Redistributions of source code must retain the above copyright notice, this list of
- conditions and the following disclaimer.
-
- 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
of conditions and the following disclaimer in the documentation and/or other materials
- provided with the distribution.
+ provided with the distribution.
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
-COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
-TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
\ No newline at end of file
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/bower_components/leaflet-routing/README.md b/bower_components/leaflet-routing/README.md
index 83e95e8..c759e18 100644
--- a/bower_components/leaflet-routing/README.md
+++ b/bower_components/leaflet-routing/README.md
@@ -1,7 +1,11 @@
-Routing in Leaflet
-==================
+Leaflet.Routing
+===============
-Research and development of a Leaflet.js routing module. The module will be capable of the routing markers and returning geojson in various ways.
+Leaflet.Routing is a routing controller for the popular Leaflet mapping
+framework. The module provides an intuitive interface for routing paths between
+waypoints using any user specified routing service. A demo using the OSM data
+can be found
+[here](http://turistforeningen.github.io/leaflet-routing/examples/osm.html).

@@ -11,13 +15,19 @@ Research and development of a Leaflet.js routing module. The module will be capa
var routing = new L.Routing({
position: 'topright'
,routing: {
- router: myRouter
+ router: myRouterFunction
}
,snapping: {
- layers: [snapping]
+ layers: [mySnappingLayer]
,sensitivity: 15
,vertexonly: false
}
+ ,shortcut: {
+ draw: {
+ enable: 68 // 'd'
+ ,disable: 81 // 'q'
+ }
+ }
});
map.addControl(routing);
```
@@ -35,11 +45,13 @@ routing.routing(true);
```
### Enable Snapping `NOT IMPLEMETED`
+
```javascript
routing.snapping(true);
```
### Recalculate the complete route by routing each segment
+
```javascript
routing.rerouteAllSegments(callback);
```
@@ -51,29 +63,52 @@ var first = routing.getFirst();
```
### Get last waypoint
+
```javascript
var last = routing.getLast();
```
### Get all waypoints
+
```javascript
var waypointsArray = routing.getWaypoints();
```
### Routing to Polyline
+
```javascript
var polyline = routing.toPolyline();
```
### To GeoJSON
+
```javascript
var geoJSON3D = routing.toGeoJSON();
var geoJSON2D = routing.toGeoJSON(false);
```
+### Load GeoJSON
+
+Load GeoJSON with and without `properties.waypoints`.
+
+#### Options
+
+* `number` waypointDistance - distance between inserted waypoints for GeoJSON without waypoints.
+* `boolean` fitBounds - fit map arround loaded GeoJSON.
+
+```javascript
+routing.loadGeoJSON(geojson, [options], function(err) {
+ if (err) {
+ console.log(err);
+ } else {
+ console.log('Finished loading GeoJSON');
+ }
+});
+```
+
## Copyright
-Copyright (c) 2013, Turistforeningen
+Copyright (c) 2014, Den Norske Turistforening
All rights reserved.
@@ -83,3 +118,4 @@ Redistribution and use in source and binary forms, with or without modification,
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/bower_components/leaflet-routing/app.js b/bower_components/leaflet-routing/app.js
index 3a335f9..1b3efce 100644
--- a/bower_components/leaflet-routing/app.js
+++ b/bower_components/leaflet-routing/app.js
@@ -141,7 +141,7 @@ var routing, data;
var coords = routing.toGeoJSON().coordinates;
var data = [];
for (var i = 0; i < coords.length; i++) {
- data.push(coords[i][1] + ' ' + coords[i][0]);
+ data.push(coords[i][0] + ' ' + coords[i][1]);
}
data = 'LINESTRING(' + data.join(',') + ')';
$.post('http://mintur.ut.no/lib/ajax/post_geom.php?api_key=' + apiKey + '&tp_id=' + id, {coords: data}, function(data) {
diff --git a/bower_components/leaflet-routing/index.html b/bower_components/leaflet-routing/index.html
index e6b1dcc..136e383 100644
--- a/bower_components/leaflet-routing/index.html
+++ b/bower_components/leaflet-routing/index.html
@@ -38,7 +38,7 @@
-
+