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

LabelLayer breaks rendering #154

Open MarsVard opened 9 years ago

MarsVard commented 9 years ago

I have a map with 5 layers on it.

    mMap.layers().add(pathLayer);
    mMap.layers().add(new BuildingLayer(mMap, baseLayerOffline));
    mMap.layers().add(labelLayer);
    mMap.layers().add(userLocationLayer);
    mMap.layers().add(poiLayer);
    mMap.layers().add(eventLayer);

when I call startActivtyForResult() from inside the fragment where the map is, and then return to the fragment of the map. the labels layer is totally broken and messes up rendering of the map.

I tried removing the labels layer and that fixed it, I tried removing other layers and it was still broken.

I also tried removing the labels layer and then adding it back to the map, and it was still broken again.

screen shot 2015-05-14 at 12 32 22

is this a known issue? is there a way to bypass this problem?

hjanetzek commented 9 years ago

Thanks for reporting. I haven't seen this issue yet. Could you provide a simple example for testing?

MarsVard commented 9 years ago

Hey @hjanetzek Here's a project that experiences the issue, it's a simple mock project with 2 activities. https://github.com/MarsVard/BrokenMaps/tree/master

Hope you are able to provide more info or a way to fix this. and thank you for this awesome project.

hjanetzek commented 9 years ago

thank you. sorry, this week is kind of super busy - I'll get to it sometime next week

hjanetzek commented 9 years ago

hmm - works for me with the latest vtm. I've changed vtm-0.5.9 to 0.6

MarsVard commented 9 years ago

I just updated to 0.6.0 and it's still happening but for some reason the first time I openend the first activity and went back it was still OK, then the 2nd time and after that the labels and map were broken.

all in the repository I posted earlier... and I also noticed this in logs:

27892-27928/com.marsvard.brokenmaps W/Adreno-ES20﹕ <__load_uniform_matrix:1091>: GL_INVALID_OPERATION

Is there a way to force map to reload? maybe if I force the map to reload when the activity resumes that will fix it ?

0nko commented 9 years ago

@MarsVard I found that it's caused by a texture used in the themes: < style-area id="tex1" src="textures/rough.png" / >

When I removed it I got rid of the error.

MarsVard commented 9 years ago

@0nko do you mean the GL_INVALID_OPERATION or the rendering being broken?

0nko commented 9 years ago

@MarsVard yeah, GL_INVALID_OPERATION

hjanetzek commented 9 years ago

@MarsVard, 0nko the texture issue should have been resolved by the latest commit

0nko commented 9 years ago

@hjanetzek you're right, it works. thanks!