[OpenLayers-Users] measure / measurepartial

Richard Greenwood richard.greenwood at gmail.com
Fri Sep 18 10:20:58 EDT 2009


Thanks Paul. That looks like what I'm trying to do.

Rich

On Fri, Sep 18, 2009 at 7:47 AM, Paul Spencer <pagameba at gmail.com> wrote:
> Rich,
>
> I've done this recently, I've attached the code.  Its mixed with some
> application-specific stuff and is configured to show text distances on each
> segment but it does show how to do something differently on move vs click
>
> Cheers
>
> Paul
>
>
>
>
> On 2009-09-18, at 9:39 AM, Richard Greenwood wrote:
>
>> 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
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>
>
>



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



More information about the Users mailing list