Installing MapLab on Windows
===============================================================================
SIMPLE INSTALL - save some time and use the MS4W build of Maplab
===============================================================================
To avoid the troubleshooting often necessary in installing Maplab, Windows users
should instead try the MS4W system found at http://maptools.org/ms4w/
That package creates a pre-configured, working version of maplab and mapserver
that won't interfere with other components of your PC.
Consider using MS4W before asking questions about configuration of Maplab
on the users list.
Even if you need to customize your installation, this is a good starting point.
If you do use the MS4W installer, you can ignore the rest of this document.
===============================================================================
References
----------
Apache Web Server documentation and downloads can be obtained from
http://www.apache.org
PHP documentation and downloads can be obtained from http://www.php.net
MapServer and PHP MapScript documentation and downloads can be obtained from
http://mapserver.gis.umn.edu
PHP MapScript is maintained by DM Solutions Group Inc.
MapLab is available from DM Solutions Group Inc.
Prerequisites
-------------
Web Server - Apache or IIS.
PHP - 4.3.2 and up are the currently supported versions.
MapServer - at least v4.0, or the latest CVS version of the 4.x branch.
PHP Mapscript - comes with MapServer in source format.
PROJ.4 - Cartographic Projections Library support files, see below.
Setting up PHP MapScript
------------------------
The first thing to do is to set up PHP Mapscript to work with your PHP
environment.
(See
http://mapserver.gis.umn.edu/doc/phpmapscript-install-howto.html#example
for help with Apache, IIS, and FoxServ.)
Install PROJ4 support files
---------------------------
If you haven't done so yet, then you should install the support files for
the PROJ4 library on your system. Normally those files reside in the
C:\PROJ directory. The official source for all those support files is the
PROJ4 site at http://www.remotesensing.org/proj/. Look for a link to
proj446_win32_bin.zip and follow the instructions in the README file inside
the ZIP file to install.
At the time this was written, the PHP MapScript builds for Windows
distributed by DM Solutions used a slightly different configuration. So,
until they are brought in sync with the official PROJ4 windows distribution,
you should get a copy of the PROJ4 support files for Windows use with
DM Solutions PHP MapScript packages at:
http://www2.dmsolutions.ca/mapserver/dl/proj4_win32.zip
Download this file and extract its contents into the C:\PROJ directory on
your Windows system.
Optional PROJ4 files
--------------------
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
http://www2.dmsolutions.ca/mapserver/dl/proj4-epsg-with-42xxx.zip
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
http://www2.dmsolutions.ca/mapserver/dl/proj4-epsg-with-42xxx-and-esri.zip
and unzip it in C:\PROJ.
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.
Configure PHP for MapLab
------------------------
Open your php.ini file (usually in C:/WINNT or equivalent) in a text editor
and
modify the following:
* Set error_reporting to not show notices (recommended):
error_reporting = E_ALL & ~E_NOTICE
* Enable the dl() function:
enable_dl = On
* Load the following extensions:
extension=php_dbase.dll
extension=php_gd.dll
* Set the session directory (recommended, can be any existing directory):
session.save_path = c:/temp
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
Configure your Web Server
-------------------------
* We will assume that you have already created a temp directory for MapServer
created images. (See
http://mapserver.gis.umn.edu/doc/phpmapscript-install-howto.html#example)
* Edit your Web server configuration to allow access to
/maplab-2.2/... and make sure that index.phtml pages
are allowed as default pages.
* 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 server.
- 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 (e.g., file
browsers, DATA fields that contain paths, etc.) and for this reason
it should ALWAYS be password-protected if installed on a public
server.
Configure MapLab
----------------
* You should now be able to access the MapLab index page at:
http:///maplab-2.2/htdocs/
* 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 from
http:///maplab-2.2//config/ in a text editor and modifying
the values.
Notes: - trailing slashes in paths are optional for the configuration tool
- all paths must be forward slashes (/)
- in setting the parameter 'warehouse_mapfiles', be aware that layers
used from this parameter will be used "as is" (i.e., data paths and
other paths in these layers might have to be modified)
- also, pay particular attention to the following parameters in the
MapLab section and make sure they are correct:
app_path
file_browser_root
mapscript_module
tmp_img_path
tmp_web_img_path
image_type
- you should also make sure to verify that 'maplab.xml path' is
correct in the MapEdit, MapBrowser, and GMapFactory sections.
* Verify your settings by clicking on the "View installation information"
icon on the MapLab index page, or go to
http:///maplab-2.2/maplab/htdocs/info.phtml.
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/
Reporting Bugs
--------------
* MapLab Users Mailing List:
http://lists.dmsolutions.ca/mailman/listinfo/maplab-users
Post a message to this list: maplab-users@dmsolutions.ca
List of Outstanding Issues to be Resolved
-----------------------------------------
MapLab:
- deal with mapfile permissions
- ability to restore defaults in the configuration tool
MapEdit:
- 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
MapBrowser:
- projection dialog
GMapFactory:
- add mapsize selection box
- add option for ROSA/HTML switch in created app
|