Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Make measure layer queryable #2078

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jokd
Copy link
Contributor

@jokd jokd commented Nov 8, 2024

Fixes #2076

@Grammostola
Copy link
Contributor

Grammostola commented Nov 20, 2024

Hi, nice addition!
I've two observations:

  • It doesn't appear to work on buffers
  • The area and length measurements in the infowindow (numbers) could be localized (you've already localized the text)

@jokd
Copy link
Contributor Author

jokd commented Dec 2, 2024

Hi, nice addition! I've two observations:

  • It doesn't appear to work on buffers
    That is because buffers are points with a radius style, hence got no area. We did something similar in the style window but I remember the figures being a bit off and needs some rework.
  • The area and length measurements in the infowindow (numbers) could be localized (you've already localized the text)
    That formatting is not in the measure control but in the attribute handling. (It would also be nice if zero rows were omitted, eg area for lines.)

@Grammostola
Copy link
Contributor

Grammostola commented Dec 2, 2024

That formatting is not in the measure control but in the attribute handling. (It would also be nice if zero rows were omitted, eg area for lines.)

I see, the numeral and unit is returned via the @length and @area functions..wherever they are defined (I had a quick look and it seemed entirely cryptic) ..for yes those functions would need to be modified to return a localized numeral. Point me in a direction and I can have a look.

Edit. Right, utils/formatareastring.js and formatlengthstring.js need to be localized ...via getattributes.js, selecteditem.js, featureinfo.js and the viewer I think

@jokd
Copy link
Contributor Author

jokd commented Dec 3, 2024

That formatting is not in the measure control but in the attribute handling. (It would also be nice if zero rows were omitted, eg area for lines.)

I see, the numeral and unit is returned via the @length and @area functions..wherever they are defined (I had a quick look and it seemed entirely cryptic) ..for yes those functions would need to be modified to return a localized numeral. Point me in a direction and I can have a look.

Edit. Right, utils/formatareastring.js and formatlengthstring.js need to be localized ...via getattributes.js, selecteditem.js, featureinfo.js and the viewer I think

src/geometry/getarea and /getlength seems to be used by the replacer

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.

Make measure queryable
2 participants