OpenSwitchMaps icon indicating copy to clipboard operation
OpenSwitchMaps copied to clipboard

accept other schemas as input

Open Bibi56 opened this issue 6 years ago • 8 comments

Some sites use similar queries with zoom, lat, and lon parameters like https://mc.bbbike.org/mc/ or anchors in the form [alpha+=]/zoom/lat/lon like http://tile.openstreetmap.fr/~cquest/leaflet/bano.html. Both share the values with OpenStreetMap. It would be nice to extract the zoom/lat/lon information to enable the extension.

Likewise queries using the Google schema (with ll=) could also be recognized.

It would greatly improve the usability of the extension

Bibi56 avatar Apr 20 '19 18:04 Bibi56

Unfortunately I don't know how to extract lat/lon/zoom from https://mc.bbbike.org/mc/ . But I want to.

tankaru avatar Apr 22 '19 10:04 tankaru

On https://mc.bbbike.org/mc/ you have 3 query parameters named lon, lat, and zoom. They appear when you add a marker, for instance when you search for a place, here looking for Berlin: https://mc.bbbike.org/mc/?lon=13.38886&lat=52.517036&zoom=10&num=4&mt0=mapnik&mt1=bing-map&mt2=cyclemap&mt3=bbbike-bbbike&marker=Berlin,%2010117,%20Allemagne

Osm.org (the URL shortener for OpenStreetMap) uses the same parameters: http://osm.org/?lat=52.51703&lon=13.38886&zoom=10

Bibi56 avatar Apr 22 '19 10:04 Bibi56

When I scroll to another place from Berlin, lat/lon/zoom parameters in URL are not updated.

tankaru avatar Apr 22 '19 10:04 tankaru

You're absolutely right, it's the initial position. Same for map.openseamap.org, http://map.openseamap.org/?zoom=7&lat=47.69459&lon=-2.57742&layers=BFTFFFFFFTF0TFFFFFFFFF for instance. But being able to switch using the initial position is better than not being able to switch. And updating the parameters is easy (click on permalink or Share, usually on the bottom right).

Looking for a map using this schema but updating the parameters I found https://adresse.data.gouv.fr/map?lng=-5.08191&lat=48.4634&z=14 Here the parameters are z, lat, lng.

Bibi56 avatar Apr 22 '19 11:04 Bibi56

Switch to the initial position is better than no switch. You're right.

I need to reconsider what is the proper behavior of this app.

tankaru avatar Apr 22 '19 14:04 tankaru

BTW, for mc.bbike.org share will update the position. Usually Permalink does the job.

Bibi56 avatar May 24 '20 19:05 Bibi56

@tankaru https://github.com/jgpacker/osm-smart-menu may be a good competitor: ideas to mix?

Bibi56 avatar Jul 03 '20 16:07 Bibi56

OSM smart menu focuses on OSM-related services. OpenSwitchMaps does not.

tankaru avatar Jul 03 '20 21:07 tankaru