bfabiszewski / ulogger-server

μlogger • web viewer for tracks uploaded with μlogger mobile client
GNU General Public License v3.0
518 stars 84 forks source link

Zoom resets when "autoreload" is selected. #230

Open MalakymR opened 3 weeks ago

MalakymR commented 3 weeks ago

When autoreload is selected, the page resets the zoom level each time, which is especially difficuilt when reload is fast (1 second etc).

This zoom level is also too close for ESRI to show images, and too close in general if a default needs to be selected.

Using 1.2 which suggsted this was fixed with https://github.com/bfabiszewski/ulogger-server/commit/f641b68e144cbed9fcd509a5fe8e2f6b9d05f587 but does not seem to be the case.

bfabiszewski commented 3 weeks ago

That is strange, because it works fine for me. Maybe this is browser specific? Please check in different browsers. Does it happen in both OpenLayers and GoogleMaps API?

Regarding zoom level, the application does not know which is minimum level for given layer. I will have to change the way the layers are added by user, so that user will also have to provide minimum level for added layer.

MalakymR commented 3 weeks ago

Firefox 126.0.1 (inc Mobile, 126.x), Edge 125.x

The auto zoom happens with GoogleMaps API too (though zooms out to a more usable viewpoint).

The webui does show 1.2 in the corner, I also checked the code to make sure it had updated and matches the changes.

bfabiszewski commented 3 weeks ago

Do you have "latest position" turned on? I now realized it still does not work when this option is on.

MalakymR commented 3 weeks ago

Yes I do - I had mistakenly assumed this is what the last update fixed.

The zoom change without latest position only seems to occur with a new position, sometimes...

bfabiszewski commented 3 weeks ago

I don't use latest position, so I forgot about it. I am now in the middle of rewriting the whole app, so I will fix it in the next version.

Without latest position it works fine for me. Zoom never changes, only view is moved when new position is put outside the window.

bfabiszewski commented 3 weeks ago

BTW, instead of ESRI layer (which I included as an example), you can add other satellite tiles, like Mapbox, which has lower minimum zoom: https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}@2x.jpg90?access_token=xxxxxxx You just need to register to get free token.