enthought/tabs — pull request #50 by johntyree (2014-08-27 04:09:07+00:00)
Title: Add a layer selection tool

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:
- z-order of layers is wrong after first call to `mapView.redraw()`
- animating both layers at once is *very* slow and causes redraw events to get badly backed up. (#33)
- It's difficult to tell, but it *also* looks like it suffers from #31 and/or #39 when both are visible. It's hard to tell because of #33.