# MapGuide Fusion Installation Instructions

This document covers basic installation steps for getting MapGuide Fusion running in your MapGuide installation.

MapGuide Fusion is designed to work with MapGuide Enterprise and MapGuide Open Source. It will not work with earlier versions of MapGuide.

## Pre-Requisites

You must first obtain and correctly install MGOS/E and one of the Web Server Extension API languages. Currently, Fusion only supports the PHP API.

Once you have a working MapGuide OS/E installation with PHP API extensions, you can install Fusion.

## Obtaining MapGuide Fusion

Fusion is available from .....

## Installing MapGuide Fusion

NOTE: It is HIGHLY RECOMMENDED that you install MapGuide Fusion inside the `WebServerExtensions/www` directory of your MGOS/E installation.

NOTE: MapGuide Fusion must be installed on the same server as your MGOS/E Web Server Extensions because it uses the API included with the Web Server Extensions.

To install Fusion, extract the MapGuide Fusion source code from the distribution package that you chose (either a tar.gz or a zip file). By default, MapGuide Fusion is configured to be installed into the 'www' directory of your WebServerExtensions installation. You may install MapGuide Fusion into a different location, as long as you follow the Configuring MapGuide Fusion steps below, and you really, really know what you are doing. Seriously. If you don't have a good reason for installing to a different location, don't do it.

## Configuring MapGuide Fusion

If you installed MapGuide Fusion into the `WebServerExtensions/www` directory, and your WebServerExtensions is installed in `C:\Program Files`, Fusion is ready to go.

If the Web Server Extensions are installed elsewhere, you must now change the default values in the following file:

`fusion/mapguide/php/Common.php`

At the beginning of this file (after the first comment block) are two lines as follows:

`$defaultInstallDir = "C:/Program Files/MapGuideOpenSource/";
$defaultExtensionDir = $installDir . "WebServerExtensions/www/";`

Modify these lines to point to your actual installation path.

If Fusion is not installed inside the `WebServerExtensions/www` directory, you must configure your web server to provide web access to MapGuide Fusion.

Doing this is dependent on the actual web server you have installed. As a minimum, you will need to set up an alias (Apache) or virtual directory (IIS) to the `fusion` directory and configure it to allow execution of PHP scripts inside `fusion` and make the PHP API extensions of MapGuide available as well.

If you do not know how to configure your web server to do this, please move the `fusion` directory to the `WebServerExtensions/www` directory.

## Testing your Installation

Fusion comes with some sample applications in the samples directory. To test your Fusion installation, you need to modify these applications for your particular setup and then load the applications. If you get a map, everything is good!

To configure the sample applications, you need to edit the following files:

index.html
  look for the `<script>` tag that includes fusion.js and modify the url appropriately. It is configured to use `localhost:8008`, which will work for local installations of MGOS/E
redirect.php
  the sample applications use the Anonymous user by default. If you have modified MGOS/E default user configuration or would like to use a different user name and password (for instance, if you need a user that has the Author role), then you can modify the $username and $password variables near the top of this file. Note that these values are not accessible to the user of the application (see Fusion Developer"s guide for more details on why redirect.php is needed and what it does).
WebLayout.xml
  the sample applications are configured to load the Sheboygan sample map that is freely available with MGOS/E. If you do not have this sample data set installed, have installed it in a different location than the default, or simply wish to use a different map, you will need to edit this file. Look for the following block:

        <Command xsi:type="MapCommandType">
            <Name>Map</Name>
            <Label>Map</Label>
            <TargetViewer>All</TargetViewer>
            <Action>MGMap</Action>
            <ResourceId>Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition</ResourceId>
        </Command>

  Change the ResourceId tag to point to the appropriate MapDefinition.

## Getting Help

If you are having trouble getting fusion running ...

$Id: installation.html 496 2007-03-20 20:32:22Z pspencer $