Hi,<br><br>Regarding this example:<br><a href="http://dev.openlayers.org/releases/OpenLayers-2.11/examples/measure.html">http://dev.openlayers.org/releases/OpenLayers-2.11/examples/measure.html</a><br><br>I&#39;ve tried to change the styling &quot;on the fly&quot; (while setImmediate(true)) if the area exceed a certain value with something like this but it&#39;s not working:<div>
<div><br></div><div>function handleMeasurements(event) {</div><div>    var geometry = event.geometry;</div><div>    var measure = event.measure;</div><div>    if (measure.toFixed(3) &gt; 10000){</div><div>      new_style_properties = {&#39;fillColor&#39;:&#39;#FF3300&#39;,&#39;fillOpacity&#39;: .5, &#39;strokeColor&#39;: &#39;#FF3300&#39;, &#39;strokeWidth&#39;: 2};</div>
<div>      new_style = new OpenLayers.Style();</div><div>      new_style.addRules([</div><div>          new OpenLayers.Rule({symbolizer: new_style_properties})</div><div>      ]);</div><div>      var new_styleMap = new OpenLayers.StyleMap({&quot;default&quot;: new_style});</div>
<div>      drawControls.handlerOptions.layerOptions = {styleMap: new_styleMap}</div><div>    }</div><div>}</div></div><div><br></div><div>Can we change the layeroptions &quot;on the fly&quot; or it will only consider the one set at creation time of the control?</div>
<div><br></div><div>regards,</div><div><br></div><div>MartinO<br><br></div>