In OpenLayers.Control.Navigation() the 'draw' method below indictes that both a 'dragPan' and 'zoomBox' control are instantiated as below.

draw: function() {
        this.map.events.register( "dblclick", this, this.defaultDblClick );
        this.dragPan = new OpenLayers.Control.DragPan({map: this.map});
        this.zoomBox = new OpenLayers.Control.ZoomBox(
                    {map: this.map, keyMask: OpenLayers.Handler.MOD_SHIFT});
        this.dragPan.draw();
        this.zoomBox.draw();
        this.wheelHandler = new OpenLayers.Handler.MouseWheel(
                                    this, {"up"  : this.wheelUp,
                                           "down": this.wheelDown} );
        this.activate();
    },

However the following code only produces a dragPan control tool in the Control.Panel. The 'zoomBox' control is not visible and does not appear to have been instantiated at all. 

var p = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar'});
p.addControls([ new OpenLayers.Control.Navigation()]);

The following code does not produce ANY VISIBLE Controls in the Control.Panel but never the less the controls are there and one can click on them.

var p = new OpenLayers.Control.Panel({'displayClass': 'olControlEditingToolbar'});
p.addControls([  new OpenLayers.Control.DragPan(), new OpenLayers.Control.ZoomBox() ]);

 

uSys Integral
Brendan Graham, CTO
e-mail: [EMAIL PROTECTED]
Tel# 305-793-3778


Get a preview of Live Earth, the hottest event this summer - only on MSN
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to