Overview Examples Documentation Download

grid

map

po.grid()

Constructs a grid control with default settings. The grid control provides reference lines of constant longitude and latitude that are overlaid on the map. The resolution of the reference lines increases with zoom level.

The grid is not part of the standard set of interaction controls (see po.interact). The grid control is rendered using SVG elements and must be styled through CSS. An example stylesheet is available in the Git repository.

grid.map([x])

Adds this control to the specified map x, removes this control from its current map, or returns the current map. This method is typically not called directly, but is needed to support the map’s add and remove methods.

If the argument x is specified, this method returns this. If x is null, this control is removed from its current map; otherwise, this control is added to the specified map. If no arguments are specified, this method returns the current map, which may be null. Whew!

Polymaps is a project from SimpleGeo and Stamen.