Map Grid

Overview

Drawing Parallels and Meridians Grid is controlled using Map Grid object described in this Article, Axes to control lines, labels and ticks and Geo Scale to control axes and grid parameters.

Grid

Map grid is a single object, use grids() method to control it:

var map = anychart.map();
map.grids(true);

Here is a sample of a map with a grid with default setttings turned on:

Playground

Lines

To tune grid lines use stroke() and minorStroke() methods:

var grids = map.grids();
grids.stroke("Black", 2, "5 2");
grids.minorStroke("Black", 0.5);

Playground

Interlace

To make grid more aesthetically pleasing or to avoid using grid lines alltogether you can use interlaced fill, which is configured using evenFill() and oddFill() methods:

map.grids().oddFill("Blue 0.5");
map.grids().evenFill("LightBlue 0.5");

Playground

You are looking at an outdated v7 version of this document. Switch to the v8 version to see the up to date information.