The GetFeature Control (done with left click) stop working after right mouse
click is performed. The workaround is
theNavControl.handlers.click.callbacks.rightclick = function() {
    myGetFeatureControl.deactivate();
    myGetFeatureControl.activate();
}

But it is not always working. Any ideas? My code:

myGetFeatureControl = new OpenLayers.Control.GetFeature({
    protocol: OpenLayers.Protocol.WFS.fromWMSLayer(knoten),
    box: false,
    toggleKey: "ctrlKey"
});

theNavControl = new OpenLayers.Control.Navigation({handleRightClicks:true});
theZoomBox = new OpenLayers.Control.ZoomBox({alwaysZoom:true});

OpenLayers.Control.CustomNavToolbar =
OpenLayers.Class(OpenLayers.Control.Panel, {
    initialize: function(options) {
        OpenLayers.Control.Panel.prototype.initialize.apply(this,
[options]);
        this.addControls([
          theNavControl,
          theZoomBox
        ]);
        this.displayClass = 'olControlNavToolbar'
    },

    draw: function() {
        var div = OpenLayers.Control.Panel.prototype.draw.apply(this,
arguments);
        this.activateControl(this.controls[0]);
        this.controls[0].activate();
        return div;
    }
});
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to