[OpenLayers-Users] NavToolbar default Navigation control not
activated
Alex
zeitalex at googlemail.com
Wed Mar 23 07:54:33 EDT 2011
Hi David,
I activate it explicitly in "draw" function.
OpenLayers.Control.CustomNavToolbar =
OpenLayers.Class(OpenLayers.Control.Panel, {
initialize: function(options) {
OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
this.addControls([
new
OpenLayers.Control.Navigation({handleRightClicks:true}),
new OpenLayers.Control.ZoomBox({alwaysZoom:true})
]);
// To make the custom navtoolbar use the regular
navtoolbar style
this.displayClass = 'olControlNavToolbar'
},
draw: function() {
var div =
OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
this.controls[0].activate();
return div;
},
activateControl: function (control) {
OpenLayers.Control.Panel.prototype.activateControl.apply(this, [control]);
groupControl.deactivate();
groupControl.activate();
}
});
Am 23.03.2011 12:36, schrieb dalsinao:
> Hello,
>
> I just upgraded from OL2.8 to OL2.10 and one thing I've noticed is that the
> NavToolbar control does not activate by default the navigation. In OL2.8 the
> Navigation control was activated by default; however, now with 2.10 none of
> the NavToolbar controls is activated and I have to explicitly click on the
> "hand" button to activate the navigation control.
>
> I have checked the code and it seems that NavToolbar is activating the
> Navigation control by default, but for some reason it does not seem to work
> until I explicitly click the hand button.
>
> Does anybody know why this happen?
> I am using IE7 and IE8, and I see the same behaviour in both.
>
> Thanks in advance for any help,
> David
>
> --
> View this message in context: http://osgeo-org.1803224.n2.nabble.com/NavToolbar-default-Navigation-control-not-activated-tp6199739p6199739.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
More information about the Users
mailing list