minetest-mapserver / mapserver

Minetest realtime mapserver, written in go
Other
101 stars 22 forks source link

Fix flickering when updatig new tile (attempt 2) #387

Closed Emojigit closed 5 months ago

Emojigit commented 5 months ago

Finally fixed the issue... *sigh* This PR is ready for review.

You can test it on my map server - you can see it updating by monitoring network requests.

coveralls commented 5 months ago

Pull Request Test Coverage Report for Build 9418311531

Details


Totals Coverage Status
Change from base Build 9405508814: 0.0%
Covered Lines: 907
Relevant Lines: 1341

💛 - Coveralls
BuckarooBanzay commented 5 months ago

so, do i get this right: this was caused by multiple calls to the onload function, right? :thinking:

Emojigit commented 5 months ago

so, do i get this right: this was caused by multiple calls to the onload function, right? 🤔

Yeah, that's true. Leaflet changes the opacity every time onload gets called, i.e., a new tile is loaded.

One thing I forgot to implement: remove the onerror call too, and do such cleanup on onerror too