This page is one of the MapGuide Community CodeSamples. Visit the CodeSamples page to view more!
General Tasks Example
The attached zip file contains the source code for the General Tasks example that can be seen on the MGOS example sites page: http://data.mapguide.com/mapguide/gt/index.php
From the included setup.txt file
In order to setup the application, you will need to:
- extract the gt.zip file in the www folder
- check the gtconstants.php file to validate the server path(s)
- load the Redding.mgp package
- create a user called Markup (password: markup) that has authoring priviledges
OR
create your own user with an Author role and edit the source code accordingly
- the generic task commands are invoke URL calls
-- Additional Notes from Steve G on the MGOS discussion list --
Here are my full instructions on how to get the shareable markups to work using MG 2.0.2.
- Extract GT.zip to folder called Markup in C:\Program Files\!MapGuideOpenSource2.0\WebServerExtensions\www
There are some extra files that you don’t need specifically for shareable markup tool (other tools in the GT sample application), but it won’t hurt to extract all the files here.
- Place gtconstants.php in C:\Program Files\!MapGuideOpenSource2.0\WebServerExtensions\www\phpviewersample
- Edit gtconstants: $INSTALL_DIR = 'C:
Program Files
MapGuideOpenSource
';
to
$INSTALL_DIR = 'C:
Program Files
!MapGuideOpenSource2.0
';
If you installed MG to another directory or if the default directory name changes, you will need to update this.
- Make sure that your coordinate system is set in your map. If not, you will get an error that says this:
Argument is null. Argument is null. Exception occurred in method MgCoordinateSystemCache.Get at line 120 in file d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\geometry\CoordinateSystem/CoordinateSystemCache.cpp
- Make sure your user has an assigned role of "User Level" (Map Author role works). If not, you will not be able to create new markup layers.
Other Downloads
The Redding dataset that is already configured to use GT is available here. It is approximately a 15 MB download. Copy the file to your MGOS server packages folder and load the package via the Administration interface. View the web layout definition in your MGOS authoring tool of choice to see the custom commands already configured for the General Tasks. http://www.spatialgis.com/Redding.mgp
Attachments (1)
-
GT.zip
(43.1 KB
) - added by 16 years ago.
General Tasks application files
Download all attachments as: .zip