enthought / tabs

Default Repo description from terraform module
0 stars 0 forks source link

Add a layer selection tool #50

Closed johntyree closed 9 years ago

johntyree commented 9 years ago

This adds the ability to toggle the velocity and salinity layers.

It still suffers from a bad z-ordering. The initial frame renders correctly, but subsequent frames render the contours over the vectors. I have tried several magic tricks without success and encourage anyone interested to volunteer ideas.

The layerSelectorControl takes care of adding and remove layers from the map and infers its initial state by which layers are present therein. I augment it here with a method to hook up listeners that also set mapView.visibleLayers appropriately, which should prevent layers from trying to download data or redraw themselves when they aren't visible.

Problems exposed by this PR but not obviously caused by it:

Assuming these problems are tolerable for now, this fixes #47.

johntyree commented 9 years ago

If it's too broken to have the option of displaying both layers, we could temporarily fake radio buttons out of the check boxes or simply not attach the control to the map while leaving the logic in place.

kjordahl commented 9 years ago

I like the layer icon. For now I think it's OK to expose both. That's most useful for testing.

kjordahl commented 9 years ago

:+1: