nrenner / brouter-web

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

Help for not experimented users / add QR Code? #332

Open EssBee59 opened 4 years ago

EssBee59 commented 4 years ago

Hello,

A long and interesting discussion was the result of my request https://github.com/nrenner/brouter-web/issues/329. To get a better overview I closed #329 and created this new one with hoppefuly a better formulation.

Use cases:

For both use cases, the goal is to help users with limited IT experience (not good knowledge of file systems) to make use of the created tour.... Use case 1: SEND the created tour to friends Use case 2: SEND the created tour to their own smartphone (or excactly to one of the prefered installed "gpx" compatible app)

RKFLX and NRENNER did a great job and suggested solutions...

Solution for use case 1:

As requested in https://github.com/nrenner/brouter-web/issues/299, the LINK of the created tour could be exported (in the clipboard?) by using a new button. The user can then address their friends via their prefered tool (mail, social media etc..) by sending the link.

The solution is easy to use and open, a soon implementation would be great!

Solution for use case 2:

I think, the "QRCode" solution proposed by RKFLX had the best potential...

==> A second button should be created in the export box of the brouter-web, proposing to expose the download LINK as a "QR Code". ==> The user then scanns the QR Code, a click and the download starts, a further click "opens" the gpx file and the user get from Android/Ios the list of the app supporting gpx. It have the choice betwen navigation app´s (Osmand, Oruxmaps, LocusMaps..) or a "gpx viewer" or a specialized app (example "Garmin Connect, which will forward the GPX to a navi-device via blue tooth)

As for use case 1, the solution is easy to use and open!

here again the "todo" list create by rkflx:


Open questions and next steps in case the feature is approved and someone is willing to work on it:

a- Design and implement UI (Show as QR code vs. download in the export box) b- Find and integrate QR code generator c- Investigate and fix issues with long and complex URLs and mimetypes in some QR code scanners (upstream bug fixes + workaround in BRouter-Web for non-free apps) d- Find a way to optionally trigger the app chooser directly e- How to handle custom profiles? Show a warning or disable the feature? f- What should happen if the URL is so long the QR code gets too large?

Related issues:


I could start first tests on my local Windows installation, the current results are:

a- open (I just replaced the function download in the "Export.js" module (function "_export"), I think the open workload is limited
b- the use of "qrcode.min.js" was OK (download with "yarn add qrcode.min.js or from Internet) c- issue #109 as example were solved with a simple "replace" | with %7C d- The app chooser: use this app once or allways is generally possible (I prefer to keep open and choose an app every time!) e- "unexperienced users" will probably never change anything in the profiles? but I think, the download with a custom_profile is today possible? f- I tested succesfully a URL of 1957 bytes (result of a 800 km track upload with reverse routing + adding a lot of nogo´s..) (the URL max. size is indeed a challenge, 2 kb is probably a limit)

I further created a small (Android only!) app, which scanns the QRCode, downloads the GPX and open it in 1 step... (+ instruction to use)

If the feature is approved, I put my code as attachement. (it documents the change in Export.js, the html page should be installed in the "brouter-web" directory or where it can be loaded by the web server) Sorry, I am not expert with github, hope someone will continue the tests and developement

[edit: related issues formatting]

EssBee59 commented 4 years ago

MODIF_Export.txt

Barcode.html.txt

nrenner commented 4 years ago

Now that you're suggesting two specific solutions, these should each have their own issue with a title that reflects the suggested solution.

So I would suggest to move the sharing with friends case into a separate issue and rename this one to the title bagage suggested (or something else with "QR code" in it).

Regarding the sharing with friends case, I'm still not convinced that sharing the download link is a good idea.

EssBee59 commented 4 years ago

Hello Nrenner I am this week with bike-frends in the Alpes, of course guided with brouter-web, Osmand and further apps... Feel free to change as you described or if you prefer I make the changes next week.

Norbert Renner notifications@github.com schrieb am Mo., 31. Aug. 2020, 17:22:

Now that you're suggesting two specific solutions, these should each have their own issue with a title that reflects the suggested solution.

So I would suggest to move the sharing with friends case into a separate issue and rename this one to the title bagage suggested (or something else with "QR code" in it).

Regarding the sharing with friends case, I'm still not convinced that sharing the download link is a good idea.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/nrenner/brouter-web/issues/332#issuecomment-683847284, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL75PSHXZRQWTGED5MGWJTDSDO535ANCNFSM4QL3KDEQ .

EssBee59 commented 4 years ago

CHANGE: I wrote above ...

Solution for use case 1: As requested in #299, the LINK of the created tour could be exported (in the clipboard?) by using a new button. The user can then address their friends via their prefered tool (mail, social media etc..) by sending the link.


BUT, after a examination I think, exchanging a URL is not secured. I would prefer an other solution (ex. sending the gpx file in an easy way)

EssBee59 commented 4 years ago

Hello, As explained above, I think that sending GPX files is better than sending Links...

Using QRCode seems a solution for "use case 2" as described above....

But, why not to use the same solution for "use case 1" ? Yes, it is a detour to transfer the GPX first to the smartphone, and to send the file from the smartphone via mail or messaging system to friends... ...but the android platform offers more possibilities as Windows! Based on the "QRCode" solution above, I added a new feature on my "Brouter-scann" app:

The features are now:

If some one want to test the function I installed a prototype on http://brouter.de/essbee/#map=11/49.9574/8.5755/standard&lonlats=8.574189,50.003326;8.655909,49.99494

(to download the app see link in the HTML page displaying the QRCode or use http://brouter.de/essbee/Brouter-scann.apk )

EssBee59 commented 4 years ago

Hello,

In the prototype I added a second icon "generate QRCode" in the "Export". The app Brouter-scann was redisigned: Scanning is now better (no problem with URL of 2 k bytes), and better overview for users...

The prototype is for me well running now, I can upload the sources by need ... Regards

EssBee59 commented 3 years ago

Status:

Regards