[OpenLayers-Dev] Re: There are two bugs in Control.Measure.

Xavier Mamano (jorix) xavier.mamano at gmail.com
Thu Sep 30 18:26:07 EDT 2010



Tim Schaub wrote:
> 
> Thanks for the patch Xavier.
> 
> The workaround for IE with partialDelay is only relevant when we're 
> waiting for a double-click.  When in freehand mode, we can fire the 
> measurepartial event synchronously.
> 
> Your addition of the cancelDelay method (and calling it from 
> measureComplete, cancel, and deactivate) is the key to fixing the rest 
> of the weird behavior.
> 
> I simplified the patch a bit to keep the cancelDelay functionality and 
> then only fire measurepartial asynchronously when not in freehand mode. 
>   This is in with r10799.  See the tests for expected behavior.  Let me 
> know if this doesn't match your expectations.
> 
> Tim
> 

Thanks for the review Tim,

All right for me. I tried freehand and performance has improved by != IE,
and in IE is the same.

Regarding Measure.js I have some comments:
 * I've found that without "window.setTimeout" in "measurePartial" using
"IE8" and "DOCTYPE" double-click works properly. I really surprised! I do
not have IE7 or IE6 to test. 
 * If no one is adapting the example "Measure.html" I am I offer to do so.
 * I have a ticket suggesting to simultaneously measure length and area, is
the http://trac.osgeo.org/openlayers/ticket/2641, (could be simplified by
removing the property singleMeasure, because the object returned by
getBothMeasures is compatible with current object)
* A little more daring, I think getBestArea + getArea can be unified into a
single function and the "for" just do the conversion to the most appropriate
unit, and the same for the length. I offer to work on it. (In the future we
could think about moving this to the Geometry class and allow measurement
while modifying a feature...)

Xavier
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/There-are-two-bugs-in-Control-Measure-tp5564767p5589658.html
Sent from the OpenLayers Dev mailing list archive at Nabble.com.


More information about the Dev mailing list