opensciencemap / vtm

a vector-tile map library written in java - running on android, desktop and within the browser
GNU Lesser General Public License v3.0
238 stars 176 forks source link

GLViewport should be considered 'changed' in more situations #143

Open AAverin opened 9 years ago

AAverin commented 9 years ago

I got an issue that when layers are changed on the map (for example, if I load and unload some of the maps on the fly) map doesn't render until I drag it. Digging in the code lead me to the rendering blocking via 'v.changed()' check, and it seems that GLViewport is considered 'changed' only if map coordinates have been changed between the frames. If I'm just loading a map and not moving it at all screen can be white or display old stale data until I drag the map.

Ability to make GLViewport 'changed' would be good, like some setChanged() method in the Viewport that will be copied over to GLViewport in the draw(), for example

hjanetzek commented 9 years ago

Yes, that sounds reasonable. Sorry, I have no time to look into this, being very busy with my studies for the next two months. It would be great if you could make a fork with the modifications you need - I'll get back to it as soon as possible.