Hi Guys,<div><br></div><div>This totally has me beaten :'( any help would be fantastic. I've tried to hack the Hover handler and a few other ways but everything leads to a dead end.</div><div><br></div><div>The Measure control has two events, EVENT_TYPES: ['measure', 'measurepartial'] . The measurepartial is triggered from a (single) click (note sure how this actually works, something todo with handlers?). There is also an 'measure' that is triggered from a double click (just as unsure).</div>
<div><br></div><div>How can I implement a 3rd event 'measurehover'? Basically I want to give someone the ability to see "how far this click will measure, if you click here".</div><div><br></div><div>This probably comes from the fact I don't understand (prototyping too well) and this code in Measure.js...</div>
<div><br></div><div><div><font class="Apple-style-span" face="'courier new', monospace"> initialize: function(handler, options) {</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> // concatenate events specific to measure with those from the base</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> this.EVENT_TYPES =</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> OpenLayers.Control.Measure.prototype.EVENT_TYPES.concat(</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> OpenLayers.Control.prototype.EVENT_TYPES</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> );</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> OpenLayers.Control.prototype.initialize.apply(this, [options]);</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> this.callbacks = OpenLayers.Util.extend(</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> {done: this.measureComplete, point: this.measurePartial},</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> this.callbacks</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> );</font></div><div><font class="Apple-style-span" face="'courier new', monospace"><br></font></div><div><font class="Apple-style-span" face="'courier new', monospace"> // let the handler options override, so old code that passes 'persist' </font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> // directly to the handler does not need an update</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> this.handlerOptions = OpenLayers.Util.extend(</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> {persist: this.persist}, this.handlerOptions</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> );</font></div>
<div><font class="Apple-style-span" face="'courier new', monospace"> this.handler = new handler(this, this.callbacks, this.handlerOptions);</font></div><div><font class="Apple-style-span" face="'courier new', monospace"> },</font></div>
</div><div><br></div><div>Thanks, it's really appreciated :)</div><div><br></div>