Installing MapLab on Linux
Apache Web Server documentation and downloads can be obtained from
PHP documentation and downloads can be obtained from http://www.php.net
MapServer and PHP MapScript documentation and downloads can be obtained from
PHP MapScript is maintained by DM Solutions Group Inc
MapLab is available from DM Solutions Group Inc.
Web Server - Apache.
PHP - 4.2.x is the minimum supported (and required) version.
PHP 4.3.0 and 4.3.1 had a bug that prevents MapLab from working
properly. This bug is fixed in 4.3.2 and up.
MapServer - at least v4.0, up to the latest CVS version of the 4.3 branch.
PHP Mapscript - comes with MapServer in source format.
Optional PROJ4 files - see below.
When you connect to WMS servers in MapBrowser, a Capabilities document is
downloaded that tells MapLab what layers can be requested from the server.
MapLab comes with two WMS parsers, one is written in PHP and one in C. The
PHP version is portable but can be slow on large Capabilities documents. The
C version is much faster but requires libxml2. If you wish to use the C
parser, you will need libxml2 version 2.4.13 (earlier versions may work).
To build the C-based parser, change to the /common/wmsparse
directory and type "make". MapLab will detect the executable and use it in
place of the PHP parser.
Setting up PHP
MapLab requires PNG or GIF support, and TTF support built into PHP. You can
also add your own options.
TTF support options:
Once you have configured PHP, you can make and make install it, and then do
the following in your php.ini file:
* Set error_reporting to not show notices (recommended):
error_reporting = E_ALL & ~E_NOTICE
* Enable the dl() function:
enable_dl = On
Note: MapLab uses PHP's sessions to pass information between components, and
the default timeout for a session is 24 minutes (or 1440 seconds). To
modify this, change the following line in your php.ini file:
session.gc_maxlifetime = 1440
Setting up PHP MapScript
MapServer and PHP MapScript need to be built with the following options in
addition to the standard options you would normally use:
--with-gd --enable-force-freetype1 --with-php --with-proj --with-wmsclient
See the MapServer documentation (above) for information on getting and
installing the PROJ.4 and GDAL libraries.
To install PHP Mapscript, copy the mapscript/php3/php_mapscript.so file to
the PHP extension directory (php-config --extension-dir, unless you have
changed the compiled-in value through php.ini).
Testing PHP Mapscript
To test your PHP and PHP MapScript installations, create a PHP script as
Load the test page through the Web server and if everything is okay, you
should see a MapScript section.
Installing Optional PROJ4 files
(Note: install these PROJ4 files only if you need them)
Some Canadian WMS servers will use some non-standard projection codes not
included in the default distribution. If you are planning to use MapLab
to connect to Canadian WMS servers, then you might want to download a
custom 'espg' file with those codes from
and unzip it in the C:\PROJ directory.
Finally, ESRI WMS servers also come with their own series of non-standard
codes. If you are planning to connect to ESRI WMS servers then you might
want to get a custom epsg file that contains the Canadian codes and the
ESRI codes, allowing you to connect to any server. Download the file
and use it to replace the original epsg file.
FAQ: But why not always install and distribute the
proj4-epsg-with-42xxx-and-esri.zip file then since it's more complete?
You should install only the epsg projection codes that you need, the epsg
file with all ESRI codes in it is 20% larger than the default one, so it
comes with extra overhead that you may not need. Also note that when
creating WMS servers, in order to be really interoperable, only EPSG codes
that are part of the standard EPSG list should be used. That is, it is a
bad idea for interoperability to use the custom Canadian codes or the custom
ESRI codes and we do not want to overly promote their use.
* Unzip the maplab zip or tar.gz file into a directory and set up the Web
server to provide access to the maplab-2.2 directory and sub-directories.
* modify the directory permissions of the data and projects sub-directories
to provide write privileges for the Web server user. Also change the
permissions of every file in the data directory.
* optionally modify the file permissions to provide write access to the Web
server user for the following files in the config directory. This will
allow the user to use the Web-based configuration tool to edit configuration
* You should now be able to access the MapLab index page at:
* Configure MapLab by clicking on the "Open XML configuration tool" icon on
the MapLab index page & modifying the values, or by manually opening
maplab.xml, mapedit.xml, mapbrowser.xml, and gmapfactory.xml in
//config/ in a text editor & modifying the values.
Note: - in setting the parameter 'warehouse_mapfiles', be aware that layers
used from this parameter will be used "asis" (i.e. data paths and
other paths in these layers might have to be modified)
* Verify your settings by clicking on the "View installation information"
icon on the MapLab index page or goto
Note: pay particular attention to the sections "Mandatory Configuration
File Settings" and "Required Modules" - these must be "OK" for
MapLab to function properly.
* You can now access MapEdit, MapBrowser, or GMapFactory from the index page
links, or you can access the components directly at:
MapEdit - http:///maplab-2.2/htdocs/mapedit/
MapBrowser - http:///maplab-2.2/htdocs/mapbrowser/
GMapFactory - http:///maplab-2.2/htdocs/gmapfactory/
* Notes: - for installations with GMapFactory: the directory where all
applications are to be built by GMapFactory
(e.g. /maplab-2.2/projects/) must be writable by your Web
- for installations with MapBrowser: the /maplab-2.2/mapbrowser/data/
directory must be writable by your Web server.
- MapLab contains some features that make it insecure (like file
browsers, DATA fields that contain paths, etc.) and for this reason
it should ALWAYS be password-protected if installed on a public
* MapLab Users Mailing List:
Post a message to this list: email@example.com
List of Outstanding Issues to be Resolved
- Windows installer
- deal with mapfile permissions
- ability to restore defaults in the configuration tool
- view by group or layer in tree menu
- help links for individual mapfile parameters
- add a projection dialog
- add a classification dialog
- keymap maker
- reports maker
- support for WMS 1.1.1
- projection dialog
- add mapsize selection box
- add option for ROSA/HTML switch in created app