In order to use this functionality, you first need to obtain a Map API key. You can do so by filling in the form at dev.2gis.com.
Next, you need to include the Ruler plugin in your project. To do this, add the following line after the main MapGL script:
Or you can install the needed package using npm:
npm install @2gis/mapgl-ruler