Select to view content in your preferred language

Drawtool (line) Measurements (as you draw)???

438
1
02-17-2011 01:21 AM
TonyCollins
Regular Contributor
Hi,

Obviously the geometry service would be too slow, but when drawing a line I would like a running total of the distance in the tooltip.

Has anyone done this or would they have any tips?

Thanks
Tags (2)
0 Kudos
1 Reply
MattiasEkström
Frequent Contributor
If you're using och spatial reference where the distance is equal to sqrt((x1-x2)^2 + (y1-y2)), you could use that and some mouseEvents (like MouseEvent.MOUSE_MOVE and MapMouseEvent.MAP_CLICK) and event.stageX, event.stageY along with toMapFromStage.
0 Kudos