BangleApps icon indicating copy to clipboard operation
BangleApps copied to clipboard

gipy: display track on openstmap

Open nxdefiant opened this issue 1 year ago • 9 comments

adds option to plot openstmap if installed, similar to recorder. Code heavily copied from openstmap.

Notify @wagnerf42

nxdefiant avatar Aug 06 '24 19:08 nxdefiant

Should the code go to openstmap module to make sharing easier? Also fixing or disabling warnings may be good.

pavelmachek avatar Aug 08 '24 08:08 pavelmachek

ok the "heavily copied from openstmap" was not very precise from me, it is actually mixed recorder and openstmap, also with changes, so it is not a 1:1 copy, you will not find many identical lines in succession.

There are also obvious differences, for example in openstmap there is a call to stop the continous updating of the track which has been left out here, also the source of the track to display is different: While recorder does not show the current position, I have decided here to include it and the default zoom level is calculated from current position + full track display. In short: I would not bother sharing code here.

nxdefiant avatar Aug 08 '24 18:08 nxdefiant

LGTM but there's some build errors that're blocking this :)

bobrippling avatar Aug 14 '24 16:08 bobrippling

I have not changed these lines

nxdefiant avatar Aug 14 '24 18:08 nxdefiant

I have not changed these lines

No worries - @atjn could you lend a hand with updating the lint exemptions?

bobrippling avatar Aug 14 '24 18:08 bobrippling

I have sometimes just added some let-statements near the beginning of the script as an easy way to make the linter happy with older code. In this case e.g:

let direction, c;

thyttan avatar Aug 14 '24 18:08 thyttan

I can fix the warnings if you want me to, but you need to provide me with a sample GPX file. Without it, the app never loads. I tried to download a few from different websites, but they all break the upload script with different errors.

atjn avatar Aug 15 '24 00:08 atjn

You need a GPX-track file, not route. I have created a test file from https://www.bbbike.org/. Both the .gpx and the .gps are in test.zip

nxdefiant avatar Aug 15 '24 04:08 nxdefiant

Thanks for the file. I made the fix in #3533 so you can merge that first, then merge this afterward.

atjn avatar Aug 15 '24 10:08 atjn

Thanks - both for the openstmap change and the lint fixes

bobrippling avatar Aug 19 '24 07:08 bobrippling