jgpacker / osm-smart-menu

An OpenStreetMap webextension for Firefox and Chrome
GNU General Public License v3.0
53 stars 12 forks source link

Improve pattern recognition on wikimap.toolforge.org #203

Open Bibi56 opened 1 year ago

Bibi56 commented 1 year ago

basemap is an optional parameter.

If you go from OpenStreetMap main page you get: https://wikimap.toolforge.org/?wp=false&basemap=2&cluster=false&zoom=16&lat=53.6202&lon=-0.1990 and it works :-) .

If you go from a OpenStreetMap wiki page you land to the same place: https://wikimap.toolforge.org/?wp=false&cluster=false&zoom=16&lat=053.620200&lon=-000.199000 and it doesn't work ;-(.

You just have to add a basemap parameter to make it work: https://wikimap.toolforge.org/?wp=false&basemap=2&cluster=false&zoom=16&lat=053.620200&lon=-000.199000

Solution: accept the url when the optional basemap parameter is missing.