Hi Ryan,<div><br></div><div>I realize its a bit late, but I ran into the same need as you&#39;ve described.  If you&#39;ve (or anyone else) has solved it, I&#39;d be curious to see your solution if you feel like sharing.  My solution is to play with the handlerOptions to overwrite the modifyFeature method of the path handler.  For a basic measure demo based off of the example, I&#39;d alter the Control definition to be roughly as follows:</div>
<div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>measurePath = new OpenLayers.Control.Measure(</div><div>                      OpenLayers.Handler.Path, {</div><div>                        persist: true,</div>
<div>                        handlerOptions: {</div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>modifyFeature: function() {</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>var index = this.line.geometry.components.length - 1;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>this.line.geometry.components[index].x = this.point.geometry.x;</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>this.line.geometry.components[index].y = this.point.geometry.y;</div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>this.line.geometry.components[index].clearBounds();</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>this.element.innerHTML=this.line.geometry.getLength().toFixed(2) + &quot; meters&quot;;<span class="Apple-tab-span" style="white-space:pre">        </span></div>
<div><span class="Apple-tab-span" style="white-space:pre">                                                                </span>}, </div><div><span class="Apple-tab-span" style="white-space:pre">                                                        </span>element: document.getElementById(&#39;measureOutput&#39;),</div><div>
                            layerOptions: {styleMap: styleMap}</div><div>                        }</div><div>                    }</div><div>                );</div><div><br></div><div>Similar logic should work for Polygon areas (haven&#39;t tried it yet).  I also want to do it for Circle (Regular poly, ~ 40 sides) radius, which is a bit trickier, as there is no getRadius function, but calculating that should be tolerable.  In theory, one should probably include some sort of granularity check (as per mouseposition) to slow down the obsessive overwriting of measureOutput, but this does appear to work.  Note that because there is always a modifyFeature before a click (addPoint), or doubleClick, there is no need to overwrite the other methods.</div>
<div><br></div><div>As I said, I&#39;m curious to hear any feedback or suggestions on better solutions.</div><div><br></div><div>Thanks,</div><div>Josh</div><br><div class="gmail_quote">On Thu, Mar 19, 2009 at 12:47 PM, RFeagin <span dir="ltr">&lt;<a href="mailto:ryan.feagin@peachtreegeographics.com">ryan.feagin@peachtreegeographics.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
Unless I&#39;m missing something, that looks exactly like what I&#39;m already doing<br>
and gets me an updated distance each time the user clicks to add another<br>
point to the polyline.  What I&#39;m looking for is to get the distance to the<br>
current mouse location (without having to click to add the current<br>
location).  The drawing of the polyline already tracks the cursor location<br>
because it is drawing the line as you move the mouse.<br>
<br>
So the user will click to create the starting point and as they move their<br>
mouse, the distance will update.  Clicking again will still add another<br>
point to the polyline.  The only difference is using the current cursor<br>
location as a &#39;moving&#39; point at the end of the polyline to give a &#39;real<br>
time&#39; distance.<br>
<font color="#888888">--<br>
View this message in context: <a href="http://n2.nabble.com/Measure-Control---get-distance-on-mouse-move-tp2503580p2504004.html" target="_blank">http://n2.nabble.com/Measure-Control---get-distance-on-mouse-move-tp2503580p2504004.html</a><br>

</font><div><div></div><div class="h5">Sent from the OpenLayers Users mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@openlayers.org">Users@openlayers.org</a><br>
<a href="http://openlayers.org/mailman/listinfo/users" target="_blank">http://openlayers.org/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>