mapcentia / vidi

Vidi – a modern take on browser GIS. It is the front-end client for GC2.
https://www.osgeo.org/projects/gc2-vidi/
GNU Affero General Public License v3.0
44 stars 24 forks source link

Print area unit #279

Closed GunnarJulJensen closed 2 months ago

GunnarJulJensen commented 1 year ago

when creating af measure area the method formatArea in browser/modules/util.js constructs the label for the area size in square meters or ha depending on the actual area size.

When the measure layer is redraw a later render, the method formatArea in public/js/leaflet-measure-path.js is used. This method do not result in the same label. It is a problem that two methods exists for the same task. The result is that the area label change when the map is re-opened after digitizing or when printing.

In this pull request the result is more or less the same - in the leaflet-measure-path.js version this._measurementOptions.imperial is uses the units ac and ft², which don't exists in the Util.js version