Map Grid


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.


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

var map =;

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

JsFiddle Playground


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

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

JsFiddle Playground


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

mapGrids = map.grids();
mapGrids.vertical().palette(["LightBlue 0.2", "LightBlue 0.5"]);

JsFiddle Playground

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