Closed johntyree closed 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.
I like the layer icon. For now I think it's OK to expose both. That's most useful for testing.
:+1:
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 setmapView.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:
mapView.redraw()
Assuming these problems are tolerable for now, this fixes #47.