Opened 13 years ago

Closed 12 years ago

#1834 closed enhancement (fixed)

Measure tool should provide a unit selection option

Reported by: trevorwekel Owned by: trevorwekel
Priority: low Milestone: 2.4
Component: AJAX Viewer Version: 2.2.0
Severity: trivial Keywords: measure, haspatch
Cc: External ID:

Description

The buffer tool in the Ajax viewer allows the end user to specify the units for the buffer region. The measure tool should do the same. Some users may find measurement by only miles and kilometers too restrictive.

Attachments (2)

measurepatch.patch (15.2 KB ) - added by trevorwekel 13 years ago.
Patch for measure tool enhancement
measurepatch2.patch (15.8 KB ) - added by trevorwekel 12 years ago.
measure patch with us survey feet

Download all attachments as: .zip

Change History (9)

by trevorwekel, 13 years ago

Attachment: measurepatch.patch added

Patch for measure tool enhancement

comment:1 by trevorwekel, 13 years ago

See attached patch measurepatch.patch for selecting the measurement units as part of the measure dialog. It was developed against the open source 2.2 branch and should be applicable to trunk.

comment:2 by jng, 12 years ago

Keywords: haspatch added

comment:3 by jng, 12 years ago

Milestone: 2.4

by trevorwekel, 12 years ago

Attachment: measurepatch2.patch added

measure patch with us survey feet

comment:4 by trevorwekel, 12 years ago

Martin Morrison suggested that I add us survey feet to the patch. See measurepatch2.patch. I have tested it with .Net. If anyone has a php or java setup running, please try it out and let me know if I broke something (bit busy this week to perform three platform testing).

comment:5 by yangte, 12 years ago

Hi Trevor, I have tested your patch on both PHP and JSP, they all worked well. when do you plan put this enhancement to the trunk? another thing is that when you change the "Measure Units" after some points drawn on the map, the total will not be changed. Would you mean to do this?

comment:6 by jng, 12 years ago

There is one small bug I've found in measureui.templ

The SetUnits() function has the unit assignment in the wrong order. The line

units = GetParent().GetMapFrame().IsEnglishUnits()? "km": "mi";

should be the other way round.

units = GetParent().GetMapFrame().IsEnglishUnits()? "mi": "km";

This ensures the default unit selection in the Measure UI lines up with whatever choice was set in the viewer options.

Other than that, the patch looks fine

comment:7 by jng, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in 2.4 (r6863, r6864, r6865, r6866, r6867) and trunk (r6868)

Note: See TracTickets for help on using tickets.