<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Hello! I have panel with buttons:<br>
<i>var panel = new OpenLayers.Control.Panel(</i><i><br>
</i><i> {</i><i><br>
</i><i> createControlMarkup: function(</i><i><br>
</i><i> control ) {</i><i><br>
</i><i> var button = document.createElement(</i><i><br>
</i><i> 'button' ),</i><i><br>
</i><i> iconSpan = document.createElement(</i><i><br>
</i><i> 'span' ),</i><i><br>
</i><i> textSpan = document.createElement(</i><i><br>
</i><i> 'span' );</i><i><br>
</i><i> iconSpan.innerHTML = ' ';</i><i><br>
</i><i> button.appendChild(</i><i><br>
</i><i> iconSpan );</i><i><br>
</i><i> if ( control.text ) {</i><i><br>
</i><i> textSpan.innerHTML = control.text;</i><i><br>
</i><i> }</i><i><br>
</i><i> button.appendChild(</i><i><br>
</i><i> textSpan );</i><i><br>
</i><i> return button;</i><i><br>
</i><i> }</i><i><br>
</i><i> }</i><i><br>
</i><i>);</i><i><br>
</i><i><br>
</i><i>var editCable = new OpenLayers.Control.ModifyFeature(</i><i><br>
</i><i> lineLayer, {</i><i><br>
</i><i>title: "EditCable",</i><i><br>
</i><i>text: 'EditCable',</i><i><br>
</i><i>vertexRenderIntent: 'temporary',</i><i><br>
</i><i>displayClass: "olControlMoveClosure",</i><i><br>
</i><i>modified: true,</i><i><br>
</i><i>createVertices: true,</i><i><br>
</i><i>mode: OpenLayers.Control.ModifyFeature.RESHAPE,</i><i><br>
</i><i>trigger: function() {</i><i><br>
</i><i> selectLineControl.deactivate();</i><i><br>
</i><i>}</i><i><br>
</i><i>} );</i><i><br>
</i><i><br>
</i><i>var drawCable = new OpenLayers.Control.DrawFeature(</i><i><br>
</i><i> addCableLineLayer,</i><i><br>
</i><i> OpenLayers.Handler.Path,</i><i><br>
</i><i> {</i><i><br>
</i><i> title: "DrawCable",</i><i><br>
</i><i> text: 'DrawCable',</i><i><br>
</i><i> displayClass: "olControlDrawClosure",</i><i><br>
</i><i> handlerOptions: { multi: false }</i><i><br>
</i><i> } );</i><i><br>
</i><i><br>
</i><i>var addSingPoint = new OpenLayers.Control.Button(</i><i><br>
</i><i> { trigger: function() {</i><i><br>
</i><i> selectLineControl.activate();</i><i><br>
</i><i> selectSingPoint = true;</i><i><br>
</i><i> },</i><i><br>
</i><i> title: "AddPoint",</i><i><br>
</i><i> text: "AddPoint"</i><i><br>
</i><i> } );</i><br>
<br>
If i click on <u>drawCable</u> button and then click on <u>addSingPoint</u>
button <span id="result_box" class="short_text" lang="en"><span
class="hps">the cursor</span> <span class="hps">will look</span>
<span class="hps">like</span> <span class="hps">the cursor to
draw: <img alt="" src="http://f3.s.qip.ru/qGVcUyLi.png"
moz-do-not-send="true" height="51" width="70"> .<br>
</span></span><span id="result_box" class="" lang="en"><span
class="hps">How to switch</span> <span class="hps">to normal</span>
<span class="hps">mode</span> <span class="hps">(with possibility
of a select </span><span class="hps">features),</span> <span
class="hps">when I clicked on</span> <span class="hps">the </span></span><span
id="result_box" class="" lang="en"><span class="hps"><u>addSingPoint</u>
button?<br>
Thanks for answer.<br>
</span></span>
</body>
</html>