MAPLAB INSTALLATION INSTRUCTIONS FOR WINDOWS ================================================= Legal Stuff ----------- Copyright (c) 2002-2003, DM Solutions Group Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Overview -------- MapLab is a suite of Open Source web applications (MapEdit, MapBrowser, and GMapFactory) developed with MapServer and PHP. MapEdit - Allows the user to edit a MapServer MAP file. The interface is relatively simple to follow if you understand the contents of a map file. MapBrowser - 1) A browser of data from remote (via WMS) and local (via MAP files) sources of data. 2) A tool for adding and previewing local or remote data within an existing mapfile. GMapFactory - Allows the user to create an interactive web mapping application by selecting a map file and then selecting a series of tools to be included...the result is a fully functional PHP application. This document describes, generically, how to set up MapLab on a Windows host machine. Because of the wide variety of system configurations, it is not practical to cover specific installations. This document assumes that you have a web server running and are comfortable with configuring it and its operating environment. It also assumes that you can set up PHP to work with your web server. Finally, you should be somewhat familiar with php_mapscript. 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. Pre-Requisites -------------- Web Server - Apache or IIS PHP - 4.3.1 is the currently supported version. MapServer - at least v3.6.4, or the latest CVS version of the 3.6 branch. PHP Mapscript - comes with MapServer in source format or can be obtained from http://www2.dmsolutions.ca/mapserver/dl/mapserver-3.6.4-win32-php4.3.0-libwww.zip 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 offical 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 in 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. i.e. it is a bad idea for interoperability to use the custom canadian codes or the custom ESRI codes and we do not want to promote their use too much. 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 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.0-RC4/... 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.0-RC4/projects/) must be writable by your web server. - for installations with MapBrowser: the /maplab-2.0-RC4/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 server. Configure MapLab ---------------- * You should now be able to access the MapLab index page at: http:///maplab-2.0-RC4/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 in http:///maplab-2.0-RC4/config/ in a text editor & 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 "asis" (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 goto http:///maplab-2.0-RC4/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.0-RC4/htdocs/mapedit/ MapBrowser - http:///maplab-2.0-RC4/htdocs/mapbrowser/ GMapFactory - http:///maplab-2.0-RC4/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: - Windows installer - 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: - support for WMS 1.1.1 - projection dialog GMapFactory: - add mapsize selection box - add option for ROSA/HTML switch in created app