diff options
author | Marcus Lundblad <ml@update.uu.se> | 2022-02-07 22:07:53 +0100 |
---|---|---|
committer | Marcus Lundblad <ml@update.uu.se> | 2022-02-07 22:35:50 +0100 |
commit | a109d938ff55412744da0341c75888aa29f90bd4 (patch) | |
tree | 1ec240e70ca1975e810be641f239a7a746b9fcac /tests | |
parent | c5652e22ac2fb6ced42c8ce49e0de4c83c87b761 (diff) | |
download | gnome-maps-wip/mlundblad/osm-location-url-no-qm.tar.gz |
uris: Accept OSM location URLs without ?wip/mlundblad/osm-location-url-no-qm
Sometimes shared URLs pointing to a location in OSM
is on the form https://www.openstreetmap.org/#map=...
E.g. encoding the parameters as part of the path
instead of a query.
Accept both variants, and add an additional test case.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/urisTest.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/urisTest.js b/tests/urisTest.js index f7991ec8..4c08bfb8 100644 --- a/tests/urisTest.js +++ b/tests/urisTest.js @@ -62,6 +62,8 @@ function parseAsCoordinateURLTest() { URIS.parseAsCoordinateURL('https://www.openstreetmap.org/?lat=39.9882&lon=-78.2409&zoom=14&layers=B000FTF')); _assertArrayEquals([59.40538, 17.34894, 12], URIS.parseAsCoordinateURL('https://www.openstreetmap.org/?#map=12/59.40538/17.34894')); + _assertArrayEquals([59.3083, 18.0183, 16], + URIS.parseAsCoordinateURL('https://www.openstreetmap.org/#map=16/59.3083/18.0183')); } function parseMapsURITest() { |