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)
by , 13 years ago
Attachment: | patch-measuretool-lastsegment-390-r1251-A1.diff added |
---|
comment:1 by , 13 years ago
comment:2 by , 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 , 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.
by , 13 years ago
Attachment: | patch-measuretool-lastsegment-390-r1255-A3.diff added |
---|
by , 13 years ago
Attachment: | patch-measuretool-lastsegment-390-r1255-A2.diff added |
---|
comment:5 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The patch looks good to me. I added the option to the measuretool sample.
Commit in r1256.
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.