nrenner / brouter-web

Web client for BRouter, a routing engine based on OpenStreetMap
https://brouter.de/brouter-web/
MIT License
363 stars 69 forks source link

Share Dialog with QR Code #729

Closed mjaschen closed 1 year ago

mjaschen commented 1 year ago

This pull-request implements sharing a route by QRCode, external services or by using the clipboard

[^1]: Mastodon instances respond with HTTP 502 when the submitted text (= the route URL in our case) is longer than the maximum post character limit on that instance. That will probably confuse users. I decided to keep the code here as this bug will probably be fixed in the future.

mjaschen commented 1 year ago
nrenner commented 1 year ago

I've added a check so that the button is enabled only if at least 2 route points are set.

No strong opinions, we can merge as is, but there might be use cases where it makes sense to only share the current map view or a single route point. Therefore I meant to still allow sharing, just not to open the export dialog at the receiving end by adding that check to index.js.

Don't know if my comment was misleading or if you prefer to disable the share dialog instead?

mjaschen commented 1 year ago

Just a misunderstanding – you're absolutely right. I'll push an update later.

nrenner commented 1 year ago

Thanks!