Skip to content
Branch: master
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Yandex Maps API area calculation plugin.

util.calculateArea module allows to calculate the area of polygons, rectangles and circles. Note that plugin works only with geodesic geometries.


  1. Load both Yandex Maps JS API 2.1 and module source code by adding following code into <head> section of your page

    <script src="" type="text/javascript"></script>
    <!-- Change my.cdn.tld to your CDN host name -->
    <script src="" type="text/javascript"></script>
  2. Wait for both API and module loaded

    ymaps.ready(['util.calculateArea']).then(function () {
        var myPolygon = new ymaps.Polygon(someCoordinates);
        // You can calculate area of any type of ymaps.GeoObject.
        var area = ymaps.util.calculateArea(myPolygon);
        // Or you can calculate area of GeoJson feature.
        var areaFromJson = ymaps.util.calculateArea({
                type: 'Feature',
                geometry: {
                    type: 'Rectangle',
                    coordinates: someRectangleCoordinates

Note: module definition uses standard Yandex Maps API namespace 'ymaps'. If you are using custom namespace, you need to fork and rebuild module for your needs.


geoObject descibed using one of following formats:

  • ymaps.GeoObject
  • ymaps.Polygon
  • ymaps.Rectangle
  • ymaps.Circle
  • GeoJson Polygon
  • GeoJson Rectangle
  • GeoJson Circle

Returns geoObject area in square meters.

For contributors

If you want to make a pull-request, run tests and check code style first.

npm install
npm run-script lint
npm test

Third party components

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied, of OpenLayers Contributors.


util.calculateArea: plugin for calculating geodesic features area.




No releases published
You can’t perform that action at this time.