[OpenLayers-Users] measure / measurepartial

Richard Greenwood richard.greenwood at gmail.com
Fri Sep 18 09:39:18 EDT 2009


On Fri, Sep 18, 2009 at 1:47 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> Hey-
>
> Richard Greenwood wrote:
>> I'm trying to make sense of measure versus measurepartial event types
>> in OL 2.8. Mouse moves and single clicks both report an event type of
>> "measurepartial". Only a double click report a "measure" event type. I
>> would like to distinguish between an mouse move (rubber band) and a
>> single click (which creates a new vertex in the line string). The only
>> way I have figured out so far to do this is to monitor the length of
>> event.geometry.components but it seems like there should be a better
>> way, which possibly I am missing.
>>
>
> The Measure control does not register a callback for the handler's
> modify event, which means that you normally receive a measurepartial
> event on a single click and a measure event on double click. If you also
> receive measurepartial on mouse move, then you have configured your
> control with a callback on the handler's modify event,

Andreas - Thanks for the reply. I did configure a callback for the
modify event as you noted. Sorry not to have mentioned that in my
original post. My problem is that I am unable to distinguish between a
mouse move and a single click. I need to do different things in
response to these two types of events.

Thanks,
Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the Users mailing list