thatcher/openseadragon — Issue #2: Add support for layers of tiles that can be turned off and on at runtime
Author: josh1093
Created: 2012-02-15 22:09:42+00:00
State: open

A use case for this feature would be a geographic map with several layers of information that could be turned off and on via an external widget.

It would be possible to achieve this with the current HTML overlays, but if the layers are large raster files themselves then it's not practical to add them using tags.

I've a taken a quick (hacky) cut at adding this functionality in a fork: http://github.com/josh1093/openseadragon

Basically what I've done is add a collection of Drawer objects to Viewer. Each layer has it's own TileSource and Drawer. When it's updating the Viewer updates each layer's Drawer. For this to work each added layer's TileSource must be the same size as the original. I'm not sure if this is be the best approach but it's a feature I'd like to see.