[OpenLayers-Users] How to display polygon length dimensions

Phil Scadden p.scadden at gns.cri.nz
Sun Jul 28 21:29:03 PDT 2013


A lot of work. Firstly you would want to use the "done" callback from 
the polygon handler to actually do the work. This gives you the polygon 
geometry. You can loop through the geometry to get each line sequence 
from which Pythagoras would give you the length. However, to add the 
dimensions, I think you are on your own. You will get the renderer and 
draw directly onto it. The problematic bit would be dealing with 
overlaps. An alternative would to add the dimensions as features 
themselves (create the geometry for them) in a separate drawing layer.

Notice: This email and any attachments are confidential.
If received in error please destroy and immediately notify us.
Do not copy or disclose the contents.



More information about the Users mailing list