OpenStreetMap

New major feature: Create your own links!

Posted by jgpacker on 17 July 2020 in English (English)

Since OSM Smart Menu version 0.13, users can add their own links using an URL Template! Configuration form to add new links

For example, you can create links like:

  • https://geohack.toolforge.org/geohack.php?params={latitude}_N_{longitude}_E
  • https://disfactory.tw/#map={zoom}/{longitude}/{latitude}
  • and https://hiking.waymarkedtrails.org/#route?id={osm_relation_id}

Please give it a try! More information is available in the respective OpenStreetMap Wiki page!

Comment from Tordanik on 18 July 2020 at 18:09

This is a great feature, thank you! I expect myself to get a lot of mileage out of the various id parameters as well as osm_user_name. :)

Is there a chance that we’ll see additional bracket parameters in the future? For example, I often find myself switching between different pages for tags (i.e. key and value somewhere in the URL) as well as keys, and this seems like it would fit the concept.

Comment from jgpacker on 20 July 2020 at 01:56

Great!

Yes, I am planning to add some other parameters like {bbox_min_latitude}.

I can also add {osm_tag_key} and/or {osm_tag_value} if they are useful. They were actually supported in the beginning of the project, but they were only used for OpenStreetMap Wiki and Taginfo (and both these websites already have links to each other), so they were removed.

Comment from Tordanik on 21 July 2020 at 20:59

I can only speak for myself, but I’d find support for tags useful. In addition to the OSM Wiki and Taginfo, I’d also use the feature for Taghistory and Overpass Turbo, and I’d probably define a few links to frequently-used Taginfo subpages for my own use as well. (Overpass is one-way, sadly – you can get there with an URL containing a key and/or value, but it instantly forwards you to a different URL.)

Would the extension be able to understand that {osm_tag_key} can be used together with {osm_tag_value} as well as by itself? Or would there be a separate parameter for the key-only case vs. the key-of-a-tag case?

Comment from jgpacker on 23 July 2020 at 18:59

Fair enough! I have added {osm_tag_key} and {osm_tag_value} in 0.14.2. I still am struggling to understand what should be in the default list of websites, so you will need to add wiki, taginfo and so on to be able to use them:

  • https://wiki.openstreetmap.org/wiki/Key:{osm_tag_key}
  • https://wiki.openstreetmap.org/wiki/Tag:{osm_tag_key}%3D{osm_tag_value}
  • https://taginfo.openstreetmap.org/keys/{osm_tag_key}
  • https://taginfo.openstreetmap.org/tags/{osm_tag_key}={osm_tag_value}

Please report any bug by a direct message or in Github. (e.g. URL encoding might be an issue at the moment).

About your question: {osm_tag_key} can be used by itself or with any other parameters. I am trying to make this as intuitive&flexible as possible.

Comment from Tordanik on 24 July 2020 at 20:11

This is awesome, thanks a lot! I’ll make sure to drop by the issue tracker if I discover any bugs. So far it works like a charm!

Login to leave a comment