User Manual

Map Extents

The Map Object provides a number of methods for working with the extents of a map namely:

A map can be zoomed to a bounding-box using the fitToBoundingBox method in the following way:

Example


window.onload = function () {
    var map = new Mapzania.Map("map-div","LONDON");
	map.fitToBoundingBox([12.1,3.4,14.3,4.2], 1.25);
};

The following interactive example shows this in action: