geoman-io / leaflet-geoman

🍂🗺️ The most powerful leaflet plugin for drawing and editing geometry layers
https://geoman.io
MIT License
2.21k stars 433 forks source link

Question: metric & showArea options for the drawn shapes #757

Closed CityBelfast closed 3 years ago

CityBelfast commented 3 years ago

Hi, Would it be possible to set metric option, which determines which measurement system and showArea option, which shows the area of drawn polygon in m3 or km2, I'm able to do it the same using leaflet.draw tool. but I'm not sure how to do it using geoman drawing tool. I tried it the following way; but it's not working map.pm.Draw.Polygon.setPathOptions({ showArea: true, metric: true });

Shows Measurement system and Area of geometry while drawing shape using leaflet image

--

Falke-Design commented 3 years ago

The measurement options are only available in the Pro ⭐ Version.

You need to create your own code for that if you don't want to pay for the pro version.

I think the events pm:vertexadded and pm:centerplaced can be useful for that

CityBelfast commented 3 years ago

thanks for the update