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

formatLength() with configured units #503

Open
DieuAnh opened this issue Sep 3, 2021 · 2 comments
Open

formatLength() with configured units #503

DieuAnh opened this issue Sep 3, 2021 · 2 comments

Comments

@DieuAnh
Copy link

DieuAnh commented Sep 3, 2021

Currently, there's no ability to choose different units (only in km/m) for two methods formatLength(), formatArea() in MeasureUtil. It would be great if you could add an option to handle different units (cm/mm/...).

@marcjansen
Copy link
Member

Can you come up with a PR? That'd be much appreciated.

DieuAnh pushed a commit to DieuAnh/ol-util that referenced this issue Dec 7, 2022
DieuAnh pushed a commit to DieuAnh/ol-util that referenced this issue Dec 21, 2022
dnlkoch added a commit that referenced this issue Jan 4, 2023
#503 add mm to formatLength and formatArea
@weskamm
Copy link
Member

weskamm commented Nov 23, 2023

this would be great as currently the formatArea method returns extreme low values when the input geometry is not in a metric projection. I think it should default to meters in that case and a transformation would be needed therefor

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

No branches or pull requests

3 participants