Skip to content
Paul Spencer edited this page Nov 19, 2010 · 12 revisions

Map API

A Map object represents a parsed mapserver map file. You get a Map object via the loadMap method of the Mapserver module.

Object Properties:

The following properties are available on a Map object. Note that changing values for some of these properties may affect the values of other properties at the time the map is drawn. For instance changing map.width may change the map's extents, cellsize and scaledenom but the values of those properties will not be reflected until you call one of the drawMap or recompute methods.

  • width - read/write integer, the width in pixels of the image to generate for this map when it is drawn
  • height - read/write integer, the height in pixels of the image to generate for this map when it is drawn
  • layers - read-only array, an array of layers in the map.

Object Methods:

drawMap

renders an image based on the Map's current state and returns a Buffer object suitable for ouput.

Clone this wiki locally