Opened 13 years ago

Closed 13 years ago

#390 closed enhancement (fixed)

measureTool - Adding the length of the last segment (or current segment)

Reported by: belug Owned by: adube
Priority: minor Milestone: 1.2.0
Component: widgets Version: trunk
Keywords: measure segment last Cc:

Description

Here a proposition for the measure tool. It could be able to show the length of the segment currently modified and when the user has finished measuring show the length of the last segment.

Attachments (3)

Change History (8)

comment:1 by belug, 13 years ago

Here's a way to do it, it's based on the function of the measure control of openlayers. I there is two way of doing this, in the geoprisma side like that or submiting it to openlayers.

For now I propose to add it the the tool as private functions and to propoose the enhancement to openlayers. And if openlayers add the function we could remodify it.

comment:2 by adube, 13 years ago

Here's a review of the patch. Instead of cloning the measure method to get the last segment only, maybe we could get it from metricData.geometry, create/clone a new geometry object out of it and use measureControl.getBestLength(lastSegGeom) directly.

What do you think ?

comment:3 by belug, 13 years ago

I like your style! I've done the modification of the patch with your idea! It is more simple like that!

Thanks.

comment:4 by belug, 13 years ago

Correction for the A2 that was wrong!

comment:5 by adube, 13 years ago

Resolution: fixed
Status: newclosed

The patch looks good to me. I added the option to the measuretool sample.

Commit in r1256.

Note: See TracTickets for help on using tickets.