[OpenLayers-Users] measure / measurepartial

Richard Greenwood richard.greenwood at gmail.com
Thu Sep 17 22:20:58 EDT 2009


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.

Specifically what I am trying to do is display the angle and length of
the vector as it is "rubber banded" by mouse moves, and also a running
total distance between single clicked vertices.

Thanks,
Rich

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



More information about the Users mailing list