[OpenLayers-Users] Info button in EditingToolbar

Sarah Schuessler sarah_flip at yahoo.de
Tue Mar 30 09:22:51 EDT 2010


Hi,

I`m new to OL but I would say that you forgot your options.
But why do you want to do it at Toolbar class and not at your own code?


best regards
Sarah


________________________________
Von: Maribel Bernal <maribel.bernal at iviron.com>
An: users at openlayers.org
Gesendet: Dienstag, den 30. März 2010, 15:01:40 Uhr
Betreff: [OpenLayers-Users] Info button in EditingToolbar

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. 

__________________________________________________
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100330/9d1cc6bd/attachment.html


More information about the Users mailing list