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

how to set the rounding to 2 decimal places #135

Open
Cezary885 opened this issue Apr 18, 2019 · 1 comment
Open

how to set the rounding to 2 decimal places #135

Cezary885 opened this issue Apr 18, 2019 · 1 comment

Comments

@Cezary885
Copy link

Hi, I have a problem with setting the rounding of distance measurement to 2 decimal places. I already changed decimals in units.js but it doesn't work

@poet-of-the-fall
Copy link

poet-of-the-fall commented Jul 30, 2019

For me its working during creation of the meassure element (typescript):

new (<any>L.Control).Measure({
	position: "topright",
	primaryLengthUnit: "meters",
	primaryAreaUnit: "sqmeters",
	secondaryLengthUnit: undefined,
	secondaryAreaUnit: undefined,
	thousandsSep: "&#8239;",
	units: { 
		meters: {
			factor: 1,
			display: 'meters',
			decimals: 2
		},
		sqmeters: {
			factor: 1,
			display: 'sqmeters',
			decimals: 2
		}
	}
}).addTo(this.map);

ghost referenced this issue Dec 3, 2019
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

2 participants