From 76fb09326e887a7d05aa8b08bb159c5f1b5852d8 Mon Sep 17 00:00:00 2001 From: Felix Kaechele Date: Sun, 11 Feb 2018 12:59:37 +0100 Subject: [PATCH] [BUGFIX] Allow negative coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The world is more than just the part east of the prime meridian and north of the equator 😜 This allows deeplinks to have negative coordinates. Also fixes the coordinate picker when selecting coordinates with negative values. Signed-off-by: Felix Kaechele --- lib/utils/router.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/router.js b/lib/utils/router.js index e2e8259..3831cd8 100644 --- a/lib/utils/router.js +++ b/lib/utils/router.js @@ -85,7 +85,7 @@ define(['Navigo'], function (Navigo) { var router = new Navigo(null, true); router - .on(/^\/?#?\/([\w]{2})?\/?(map|graph)?\/?([a-f\d]{12})?([a-f\d\-]{25})?\/?(?:(\d+)\/([\d.]+)\/([\d.]+))?$/, customRoute) + .on(/^\/?#?\/([\w]{2})?\/?(map|graph)?\/?([a-f\d]{12})?([a-f\d\-]{25})?\/?(?:(\d+)\/(-?[\d.]+)\/(-?[\d.]+))?$/, customRoute) .on({ '*': function () { router.fullUrl();