Ruler | 2GIS Documentation


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

Next, you need to include the Ruler plugin in your project. To do this, add the following line after the main MapGL script:

<script src="^2/dist/ruler.js"></script>

Or you can install the needed package using npm:

npm install @2gis/mapgl-ruler