openstreetmap / openstreetmap-website

The Rails application that powers OpenStreetMap
https://www.openstreetmap.org/
GNU General Public License v2.0
2.22k stars 918 forks source link

Share button should preserve the node/way/relation id when creating the URL #5252

Closed jidanni closed 1 month ago

jidanni commented 1 month ago

Problem

Check this magnificent genuine working link I created, https://www.openstreetmap.org/way/579405035?mlat=24.181444&mlon=120.865815#map=16/24.181444/120.865815 It's packed with

  1. a way
  2. a zoom level
  3. a screen center position
  4. a marker
  5. a (default) map layer

I can't think of much more one could pack in.

Description

How did I ever create it? Did I use the Share button?

Well I tried, but it threw away the way. I wish it wouldn't.

So I ended up crafting it by hand.

See also #905.

Screenshots

zzz

Narration

The bad guys came up the orange path on their way to the four-corner junction marked with the marker.

AntonKhorev commented 1 month ago

How do you want the html embed to behave in this case?

jidanni commented 1 month ago

How do you want the html embed to behave in this case?

Naturally it should look just like the picture I posted.

AntonKhorev commented 1 month ago

How do you want the html embed to behave in this case?

Naturally it should look just like the picture I posted.

Naturally it can't look just like that because there's no header and no sidebars. The question is do you want the sidebar with the element info or do you just want it rendered with an orange line/circle?

jidanni commented 1 month ago

Very good question. And I think the answer should be just the map only, never mind the sidebar. Because the person doing the embedding should be responsible for putting the words they want in their own caption for their picture.

For instance I select that road but the OSM way number of that road is not important at all for the people I want to show it to. So in my caption I would write "this is the road that criminals went up" (and thank goodness there is no extra verbiage from that sidebar entering my presentation.)

mmd-osm commented 1 month ago

I don't think share links with node/way/relations are a good fit for sharing and publishing elsewhere. Remember, element ids are not stable and could change at any time, even by your "criminals".

I vote for closing this issue, since it's fairly off topic for the site.

AntonKhorev commented 1 month ago

We could have links to specific versions of elements that don't change but even the actual osm website can't show them currently. There is a pull request for nodes though #4930.