Files
Drew Slobodnjak fe0f193189 Geomap: Add measuring tools (#51608)
* Geomap: add measuring tools

* Add measure type selection

* Add controls and state to measure overlay

* Override tooltip mouse events when menu active

* Move measure tools to top right

* Lay groundwork for units and consolidate measuring

* Create measure vector layer class

* Improve styling to match other overlay controls

* Consolidate styling and use theme2

* Update unit language and add km2

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
2022-08-03 16:19:30 -07:00

17 lines
523 B
TypeScript

import { measures } from './measure';
describe('get measure utils', () => {
it('switch from length to area', () => {
const length = measures[0];
expect(length.value).toBe('length');
expect(length.getUnit('ft').value).toBe('ft');
expect(length.getUnit('ft2').value).toBe('ft');
});
it('switch from area to length', () => {
const area = measures[1];
expect(area.value).toBe('area');
expect(area.getUnit('ft2').value).toBe('ft2');
expect(area.getUnit('ft').value).toBe('ft2');
});
});