From 928229530f8e4cb03d07a83280e877cecde0193e Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Fri, 22 Aug 2014 10:44:54 +0200 Subject: [PATCH] handle old 'format=gpx' permalinks: format is not an option --- js/router/BRouter.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/js/router/BRouter.js b/js/router/BRouter.js index 5f47765..1b49234 100644 --- a/js/router/BRouter.js +++ b/js/router/BRouter.js @@ -10,9 +10,10 @@ L.BRouter = L.Class.extend({ }, options: { - format: 'geojson' }, + format: 'geojson', + initialize: function (options) { L.setOptions(this, options); @@ -41,7 +42,7 @@ L.BRouter = L.Class.extend({ nogos: this._getNogosString(this.options.nogos), profile: this.options.profile, alternativeidx: this.options.alternative, - format: format || this.options.format + format: format || this.format }; }, @@ -59,9 +60,6 @@ L.BRouter = L.Class.extend({ if (params.profile) { opts.profile = params.profile; } - if (params.format) { - opts.format = params.format; - } return opts; },