MapServer MAP Object

Within the MAP section there are various settings described below.  A typical example would be:

MAP Object
MAP
   SIZE 580 400
   EXTENT 450029 519061 450708 519536
   FONTSET "d:/mapserver/cgi-bin/shared/fonts/fonts.list"
   SYMBOLSET "d:/mapserver/cgi-bin/shared/symbols/symbols.sym"
   SHAPEPATH "D:\Maps\ShapeFiles"
   DEBUG ON
   UNITS METERS
   RESOLUTION 72
   IMAGETYPE PNG

Element

Description

Example

SIZE

This is the default output size width height for any map images created.  Useful when debugging (detailed later) but iShare overrides this when running

580 400

MAXSIZE

Sets the maximum size of the map image. This will override the default value. For example, setting this to 2048 means that you can have up to 2048 pixels in both dimensions (i.e. max of 2048x2048). Default is 2048.

From V5.8.0 - If you wish to use HiDPI printing in iShare GIS and use an A1 size template then this needs to be set to 16384.

2048

EXTENT

Default extent x1,y1,x2,y2 for the map.  Useful when debugging.

450029 519061 450708 519536

FONTSET

Defines a list of fonts that are used by MapServer for things such as labels. This is installed as standard and normally doesn’t need changing.

d:/mapserver/cgi-bin/shared/fonts/fonts.list

SYMBOLSET

Defines a list of symbols that are used by MapServer for icons, line and polygon styles etc.This is installed as standard and you may wish to add your own symbols – please see section on symbols.

d:/mapserver/cgi-bin/shared/symbols/symbols.sym

SHAPEPATH

Defines the ROOT where your maps are located.  We normally suggest this being on local drive of the web server for speed and resilience.  Layers can then  be referenced through partial layer paths.

D:\Maps\astun\sample

DEBUG

Whether to debug output to the log files (located in the temp folder) – once you are confident with your MAP file then this can be turned off in production.

ON or OFF

IMAGETYPE

We normally use PNG but you can use JPEG, GIF.

PNG

UNITS

We normally use METERS as data is in British National Grid.

METERS

RESOLUTION

DPI for the output images – above 96v doesn’t affect it too much.  Default at 96.

96

For full details of the MapServer MAP Object please see the MapServer MAP Documentation.