OpenGeoscience / geoweb

Open source geoscience tools and applications
8 stars 3 forks source link

Zooming causes layers that are toggled off to reappear. #200

Closed cjh1 closed 10 years ago

cjh1 commented 10 years ago

Here are the step to recreate:

cjh1 commented 10 years ago

After a little investigating I can see what the issue is here. Basically and zoom or resize events end up causing updateAndDraw(...) to be called on the map which in term causes update(...) to be called on the featureLayer. The featureLayer requests the data from data source and rebuilds its features. This new set of features doesn't respect the visibility of the layer. So issue can be resolved by setting the correct visibility on these new features. However I think there is remove optimization here:

cjh1 commented 10 years ago

It looks like the legend has the same issue, the issue can be solved in the same way. However, the questions about optimization apply equally.

cjh1 commented 10 years ago

Changes pushed in 200-fix-toggle-visibility

cjh1 commented 10 years ago

Thats a geojs branch

cjh1 commented 10 years ago

@aashish24 can you take a look at this branch

aashish24 commented 10 years ago

Yes, I should have some time this afternoon. thanks

aashish24 commented 10 years ago

Approved