<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt"><div>Hi,<br><br>I`m new to OL but I would say that you forgot your options.<br>But why do you want to do it at Toolbar class and not at your own code?<br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br>best regards<br>Sarah<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">Von:</span></b> Maribel Bernal <maribel.bernal@iviron.com><br><b><span style="font-weight: bold;">An:</span></b> users@openlayers.org<br><b><span style="font-weight: bold;">Gesendet:</span></b> Dienstag, den 30. März 2010, 15:01:40 Uhr<br><b><span style="font-weight: bold;">Betreff:</span></b> [OpenLayers-Users] Info button in EditingToolbar<br></font><br>
Hi all openlayers developpers. <br>
Can I to modify the EditingToolbar class for include a button that adds
"OpenLayers.Control.SelectFeature" control on the map? <br>
There are any way to do this?<br>
<br>
This is my code, but I think I'm doing something wrong... the button
appears in the EditingToolbar but does nothing:<br>
<br>
<small><font face="Courier New, Courier, monospace">OpenLayers.Control.EditingToolbar
= OpenLayers.Class(OpenLayers.Control.Panel, {<br>
initialize: function (layer, options) {<br>
OpenLayers.Control.Panel.prototype.initialize.apply(this,
[options]);<br>
this.addControls([new OpenLayers.Control.Navigation()]);<br>
var controls = [new OpenLayers.Control.DrawFeature(layer,
OpenLayers.Handler.Point, {<br>
'displayClass': 'olControlDrawFeaturePoint'<br>
}), new OpenLayers.Control.DrawFeature(layer,
OpenLayers.Handler.Path, {<br>
'displayClass': 'olControlDrawFeaturePath'<br>
}), new OpenLayers.Control.DrawFeature(layer,
OpenLayers.Handler.Polygon, {<br>
'displayClass': 'olControlDrawFeaturePolygon'<br>
}), </font><font color="#3333ff" face="Courier New, Courier, monospace">new
OpenLayers.Control.SelectFeature(layer)</font><font face="Courier New, Courier, monospace">];<br>
this.addControls(controls);<br>
},<br>
draw: function () {<br>
var div = OpenLayers.Control.Panel.prototype.draw.apply(this,
arguments);<br>
this.activateControl(this.controls[0]);<br>
return div;<br>
},<br>
CLASS_NAME: "OpenLayers.Control.EditingToolbar"<br>
});</font></small><br>
<br>
<br>
Many thanks for your time.
</div></div>
</div><br>__________________________________________________<br>Do You Yahoo!?<br>Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz gegen Massenmails. <br>http://mail.yahoo.com </body></html>