Hi all openlayers developpers.
Can I to modify the EditingToolbar class for include a button that adds "OpenLayers.Control.SelectFeature" control on the map?
There are any way to do this?

This is my code, but I think I'm doing something wrong... the button appears in the EditingToolbar but does nothing:

OpenLayers.Control.EditingToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
    initialize: function (layer, options) {
        OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
        this.addControls([new OpenLayers.Control.Navigation()]);
        var controls = [new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Point, {
            'displayClass': 'olControlDrawFeaturePoint'
        }), new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Path, {
            'displayClass': 'olControlDrawFeaturePath'
        }), new OpenLayers.Control.DrawFeature(layer, OpenLayers.Handler.Polygon, {
            'displayClass': 'olControlDrawFeaturePolygon'
        }),
new OpenLayers.Control.SelectFeature(layer)];
        this.addControls(controls);
    },
    draw: function () {
        var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
        this.activateControl(this.controls[0]);
        return div;
    },
    CLASS_NAME: "OpenLayers.Control.EditingToolbar"
});



Many thanks for your time.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to