opoto/wtracks

Sharing exact map view

Opened this issue · 2 comments

Currently we have

  1. custom map sharing
  1. track sharing, that can be (ab)used to change displayed map like this:

Based on quick testing I don't think either can be used to

  • share exact current map view (base+overlays+location+zoom)
  • ...especially if maps are hidden or custom

Some propositions to extend tracks sharing:

I might PR some of this, what do you think?

opoto commented

Hi

I understand it could be useful to configure a map view through URL parameters, although WTracks is more about editing/showing/sharing tracks than maps.
As a general and privacy preserving rule, whatever you pass in the URL should not persistently change the user configuration without explicit user consent (prompt explaining what will change and offering Ok/cancel, as in map import).

What I think could be useful and sufficient for your needs would be:

  • allow to pass a list of overlays, eg "&overlays=Hills,MTB"
  • a map parameter in URL is displayed even if it is hidden in the user preferences. A prompt may ask to change user settings to unhide it persistently.

Supporting map import together with external track loading would require a significant refactoring, and it would increase the loading time of the landing page. I feel it is simpler to keep it a separate operation (still a single click)

To share an area with a specific zoom, one can draw a rectangle-shaped track surrounding this area, and share that track.

PRs are always welcome!

As a general and privacy preserving rule

I understand the privacy & perf concerns for the imports. But for the hidden maps I would say "practicality beats purity". Especially since un-hiding the map just make available a curated (by you) map, so not that much of a security issue.

Also, right now you haven't implemented this links are transient instead of persistent strategy: if you click the tracks sharing links above, they will change your "remembered map". There's also an argument to be made for this, where the mental model "the app remains in the last seen state" may be a more consistent UX than "some stuff is remembered but not all" especially without a careful visual language around what does it mean to be in a transient session.

WTracks is more about editing/showing/sharing tracks than maps ... To share an area with a specific zoom ... share that track

You forgot creating 😄. It means I may want to share a link that allow people to start drawing right away without fiddling with settings or removing a weird rectangle.

It's especially important to be able to share a location when the map I'm linking to does not cover the whole world, especially the default (0,0) start position. Concretely, if I recommend on a Spanish forum to use https://opoto.github.io/wtracks/?map=SP%20IGN%20Raster to start creating tracks, the experience is not great (try opening in incognito window, and not sharing location).

This is the case for a majority of the WTracks out-of-the box maps now (as the best quality maps are always local ones). We can't even have WTracks center on a covered area by default, since there's no standard for XYZ tile APIs to share map bounds, that would only be feasible for the other, rarer map types.

PRs are always welcome!

Thanks for sharing, I'll see what I can do!
Can you point me to the current ?map=... parsing code ? → The keyword is getParameterByName