Still have questions?
Contact support
You are looking at an outdated 7.12.0 version of this document. Switch to the 7.13.0 version to see the up to date information.

Map Geo Scale

Overview

Geo Scale controls parameters that define numerical parameters that primarily affect how Map Grid and Map_Axes are displayed. Map scale is represented by anychart.scales.Geo class.

Tick intervals

You can control major and minor tick intervals using interval() of xMinorTicks(), yMinorTicks(), xTicks() and yTicks():

var scale = map.scale();
scale.xTicks.interval(10);
scale.yTicks.interval(10);
scale.xMinorTicks.interval(2);
scale.yMinorTicks.interval(2);

JsFiddle Playground

Minimum and Maximum

Controlling minimum and maximum for scales allows you to control the area of the map displayed, it is done using maximumX(), maximumY(), minimumX() and minimumY() methods:

var mapScale = map.scale();

// set scale minimums and maximums
mapScale.minimumX(110);
mapScale.maximumX(150);
mapScale.minimumY(-50);
mapScale.maximumY(-10);

JsFiddle Playground

Precision

You can control map scale precision using the precision() method, it allows to change both x and y precision, if needed.