Skip to content

feature: Add Annotations to Measurements#992

Open
theduckylittle wants to merge 4 commits into
mainfrom
feature/add-measurement-annotations
Open

feature: Add Annotations to Measurements#992
theduckylittle wants to merge 4 commits into
mainfrom
feature/add-measurement-annotations

Conversation

@theduckylittle

Copy link
Copy Markdown
Member

Adds new annotations for measurements:

image

Which can also be toggled off with the new labels toggle:

image

@theduckylittle theduckylittle force-pushed the feature/add-measurement-annotations branch from 2387951 to e4e57cb Compare June 5, 2026 15:10
@klassenjs klassenjs added this to the v3.16 milestone Jun 5, 2026
@chughes-lincoln

Copy link
Copy Markdown
Contributor

This looks great and I think some of the people that use our site will be really excited by this!

I have some thoughts on how the measure units change for area when you switch between length and area. I think it makes sense that changing length units from feet to meters will change area units from sq. feet to sq. meters. I think it's less obvious for chains (and rods - which isn't in the demo but is an option in the underlying code). I was talking with the surveyors in our office about what would be intuitive to them, as they're the ones that tend to use chains and rods, and they recommended Acres, over square feet (which is what chains defaults to) and square rods (which rods defaults to - though I'm not sure if square rods can be set in the configuration, so it looks like the user has no area unit selected).

My only other comment is if the configuration for turning the units off by default should be with the other measure configurations:

var app = new gm3.Application({
        mapserver_url: CONFIG.mapserver_url,
        mapfile_root: CONFIG.mapfile_root,
        map: {
             measure: {
                    areaUnits: ["ft", "mi", "a", "h", "m", "km"],
                    lengthUnits: ["ft", "mi", "ch", "r", "m", "km"],
                    showMeasureLabels: false
          }
    });

@chughes-lincoln

Copy link
Copy Markdown
Contributor

I did notice some interesting behavior when selecting from results. Labeling the area is useful, but I could see people making false assumptions about the labels for the line segments, as it can be hard to tell when a label isn't being displayed because it doesn't fit (particularly when you have polygons with vertices without obvious changes in direction).

Take this parcel for example, the section along SE Whalesong Dr shows as 127 feet, but you would need to zoom in to see a bunch of sub-1ft segments to see that it's actually closer to 230ft

image

Or this example where a couple of line segments aren't showing:

image

It might be useful to disable labeling line segments for features from the results (or at least letting the admin turn them off for results). I may also be overanalyzing things. I like the labeling for when users are adding their own lines and polygons.

@theduckylittle

Copy link
Copy Markdown
Member Author

@chughes-lincoln , just pushed some changes based on your earlier feedback.

We could turn off label suppression? That would ensure all the little bits are coming through but would be, ultimately, much uglier when it's dense.

@chughes-lincoln

Copy link
Copy Markdown
Contributor

I think those changes are good.

Overall I like how the labels are suppressed for user-added lines/polygons more than I dislike how they're suppressed for features from results. People capable enough to measure features from results probably know enough to zoom in to see all the labels.

@tchaddad

tchaddad commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Not sure if I followed Chris' last comment, but I wanted to agree that users will really like this feature!

I think that's particularly true for things that users draw on the map, and think this feature can be used in conjunction with regular sketches in interesting ways.

- Ensure area labels are clearly marked.
- Add a labels toggle to the map based on whether there are measure features.
- Add an "active" state to map buttons to show it is "on"
- Provide translations for the new measurement toggles.
- Adds tests
- Document how to turn label for measurements off by default.
@theduckylittle theduckylittle force-pushed the feature/add-measurement-annotations branch from 329c18d to 26f5f68 Compare June 11, 2026 15:24
@klassenjs

Copy link
Copy Markdown
Member

Is this one ready to merge or still under discussion?

@chughes-lincoln

Copy link
Copy Markdown
Contributor

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants