On Thu, Aug 14, 2008 at 3:11 PM, Bill Thoen <[EMAIL PROTECTED]> wrote:
> I figured out that by setting the property 'out' on the ZoomBox control
> to 'true' the tool then becomes a ZoomOut tool. So I made two copies of
> the tool and set one of them to out=true. But then how do I style them
> differently? Since they're both ZoomBox controls they get assigned the
> same CSS style. How do people differentiate them?
You override displayClass, e.g.:
var zbo= new OpenLayers.Control.ZoomBox(
{title:'Zoom Out by clicking or dragging a rectangle.',
out: true,
displayClass: "olControlZoomBoxOut"});
And in a style you set something like:
.olControlPanel .olControlZoomBoxOutItemInactive {
width: 24px;
height: 22px;
background-image: url("../graphics/zoomout.gif");
}
.olControlPanel .olControlZoomBoxOutItemActive {
width: 24px;
height: 22px;
background-image: url("../graphics/zoomoutX.gif");
}
--
Richard Greenwood
[EMAIL PROTECTED]
www.greenwoodmap.com
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users