You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If using WMS layers from postgresql views geoserver assigns random feature ids upon getfeatureinfo request which means multiple measure actions can be taken on a single polygon or line, this results in an increasingly visible style change. This may be an issue with not having configured Geoserver for stable keys for such layers however, but it might be worth documenting for the tool.
If using WMS layers with infoFormat set to something other than application/json (default) then the getfeatureinfo that this tool sends in order to get a stable ID and geometry back will probably not result in that, so the tool should probably always issue getfeatureinfo requests with infoFormat application/json (at least for Geoserver. Maybe check the server "type" of the source)
I note that only geometry types line and polygon are accepted. Would it be a smoother user experience if multiLine and multiPolygon were accepted as well?
Tested with GeoServer and it works like expected, but:
I agree with @Grammostola that MultiLine and MultiPolygon should be supported. In origo it is not common to create multiparts, but it is possible (with just one ring) and external sources could very well be multiparts. It requires some additional fixing of the old code, but not much. No sure if measure should just explode multiparts and label each sub part or label just the aggregate. Both is better that just ignoring them. Labling both would probably look messy.
I don't think the stable key issue is an issue. It requires the user to click the same feature multiple times and can easily be cleared. The same problem could also arise in WFS layers if using BBOX without stable keys, which would load the same feature for each new extent. It is just bad practice to not have stable keys.
The icon should be changed. The current looks like a color picker. I suggest using just a plain old arrow from material:
The featureInfo tool has an option to change the mouse pointer if there is something to click where the pointer is. That would be cool if that could be reused, but not necessary if it means duplication the code.
Added support for multilines- and polygons, force using application/geo+json (should work with most servers, unless they only support GML or similar), fixed a small bug and changed the icon to
Stable IDs: I don't think there's a lot I can reasonably do here sadly, other than storing the entire feature including attributes and geometry and compare it
Different pointer on hover actually already works using the functionality from featureinfo.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Screencast.From.2026-01-30.23-23-58.online-video-cutter.com.mp4
Closes: #2276
Not super happy about the icon, but couldn't find anything better either.