Start by creating a folder named MapFish, this will be your working folder for this workshop. In the rest of this document we’ll assume that the MapFish folder is located in C:\, we’ll refer to it as C:\MapFish.
Get the Workshop material by checking out http://www.mapfish.org/svn/mapfish/sandbox/camptocamp/mapfish_workshop with Turtoise SVN. For this open the explorer, go into C:\MapFish, right-click in the explorer window, choose SVN Checkout..., enter the above URL, check that the Checkout directory is C:\MapFish\mapfish_workshop, and click OK.
Export the mapfish_workshop folder to your Apache document root, for example by copying it in Apache’s htdocs directory. You should be able to load http://localhost/mapfish_workshop/printing in your web browser.
To install MapFish, open a terminal command and follow these steps:
C:\>cd C:\MapFish
C:\MapFish>C:\Python25\python.exe mapfish_workshop\go-mapfish-framework-all.py env
This command creates a virtual Python environment named env and installs MapFish and its dependencies into it.
Now activate the virtual environment with:
C:\MapFish>env\Scripts\activate.bat
You command prompt should now look like this:
<env> C:\MapFish>
To check that MapFish is correctly installed, enter:
<env> C:\MapFish>paster create --list-templates
and check that the output is:
Available templates:
basic_package: A basic setuptools-enabled package
mapfish: MapFish application template
mapfish_client: MapFish client plugin template
paste_deploy: A web application deployed through paste.deploy
pylons: Pylons application template
pylons_minimal: Pylons minimal application template
It is recommended that you use FireFox and install Firebug [1]. Firebug is an add-on for Firefox that allows you to debug JavaScript in any web page. Firebug requires Firefox and cannot be used with any other web browser. Installing the JSONView extension is also recommented, it will be used for viewing JSON responses in FireFox.
[1] | http://getfirebug.com/ |
[2] | https://addons.mozilla.org/en-US/firefox/addon/10869 |