Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default plugin in webserver #1129

Open
miuratv opened this issue May 28, 2024 · 10 comments
Open

Default plugin in webserver #1129

miuratv opened this issue May 28, 2024 · 10 comments

Comments

@miuratv
Copy link

miuratv commented May 28, 2024

Hi, it's possibile to load by default the "ol-map" plugin in the web based interface? Every time i reload the page it gets deactivated. I'd like to have it always on.

@u-an-i
Copy link
Contributor

u-an-i commented May 28, 2024

Hi, hi @albar965 ,

we can make the ol-map plugin the default for everyone on startup or
we can save the selection state of every plugin in the browser local storage (which persists until it is explicitly cleared when instructing to clear the browser cache) and attempt to enable/disable the saved selected/deselected plugins on load of the page.

We can even do both :)

Did the ol-map have limitations wrt display of some features ? I apologize for my asking, I haven't used the web server in a while (and don't want to spend the time to boot up FS and everything to test now).

Your call, @albar965 :)

I can handle implementation within this week I guess (though it likely won't result in a release of a new lnm version this week @miuratv ), anyone else is welcome to contribute too of course (but tell before 2 people attempt the same thing :) ).

@albar965
Copy link
Owner

OL as default make sense IMO.

The only small issue I see is that the OL map always jumps back to coordinates 0/0 when starting or switching pages. There are also no updates if a user changes the map settings or adds user features.

Any way to add an auto update and fix the 0/0 issue?

Alex

@u-an-i
Copy link
Contributor

u-an-i commented May 29, 2024

0/0 I guess is doable.

About the update: this might be the limitation I remember: the ol-map uses tiles and caches them.
The cache might have to get invalidated completely or cleverly where necessary.

I'll have a look if i can figure these things out.

u-an-i added a commit to u-an-i/littlenavmap that referenced this issue May 30, 2024
…plugins, reformat and rephrase documentation, update ol-maps plugin

supports ease-of-use regarding albar965#1129
@KOKAProduktion
Copy link
Contributor

Hiho guys!

Please forgive my silence. A lot has happened and I'm currently quite occupied but I'm always reading the stream and dreaming on re-joining you guys someday :)

I understand that you'd like to modify the packaged ol-map JS bundle in order to fix its static initialization.
The source repo is KOKAProduktion/littlenavmap-openlayers
and the lines you're probably looking for are here:
https://github.com/KOKAProduktion/littlenavmap-openlayers/blob/6723fee95b4d5055c87b37ee71c15635b3faea37/src/index.js#L48

I'm sorry that I can't take up any tasks at the moment to help out myself but please let me know if you have questions or issues. I'll try my best to answer/help as much as possible...

All the best and high five for keeping the flame burning! You guys are awesome!

Cheers!

@albar965
Copy link
Owner

albar965 commented May 31, 2024

Just merged #1131 and cherry picked this into release/3.0 but see no changes. Still starting at 0/0 and even a reload takes me back to old map.

Edit: just noticed another PR around. Hold on. PR is for OL repo.

albar965 pushed a commit that referenced this issue May 31, 2024
…plugins, reformat and rephrase documentation, update ol-maps plugin

supports ease-of-use regarding #1129

# Conflicts:
#	web/index.html
@u-an-i
Copy link
Contributor

u-an-i commented May 31, 2024

@albar965 when you switch between menus (Map, Aircraftn Flightplan, ...) the map now remains in its last state.

The initial load when (re-)loading the whole webpage is not affected.

I need the PR in the ol repo from @KOKAProduktion for that.

@albar965
Copy link
Owner

Ok. Will wait.

@albar965
Copy link
Owner

And please do not use the master branch of LNM and atools. 😉

@u-an-i
Copy link
Contributor

u-an-i commented May 31, 2024

yes, I already got the message :)

@u-an-i
Copy link
Contributor

u-an-i commented Jun 8, 2024

@albar965 this one is done in release/3.0 branch now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants