mapguide-rest provides the following services:
- A REST-ful http interface modeled on original discussions on a RESTful web service for MapGuide
- A re-imagining of GeoREST and its data publishing capabilities
mapguide-rest is written in PHP and uses the following libraries:
This project is not affiliated with Autodesk or OSGeo.
mapguide-rest requires an installation of MapGuide Open Source and its bundled copy of PHP. As PHP is required by Fusion and other installed MapGuide web applications, this requirement will almost always be satisifed.
mapguide-rest has been tested on MapGuide Open Source 2.6. It should theoretically work on any installation of MapGuide Open Source or AIMS that includes PHP 5.3 or newer.
NOTE: For convenience, you should use one of the pre-packaged release distributions
Ensure you have a git and svn client installed and this is accessible from the command-line.
Clone this repository into the www directory of your MapGuide Open Source installation. Rename the clone directory to "rest" (eg. C:\Program Files\OSGeo\MapGuide\Web\www\rest on windows or /usr/local/mapguideopensource-2.6.0/webserverextensions/www/rest on linux)
Install PHP Composer if you have no done so already
Run the following composer command from the root of your clone to pull down required vendor libraries
php composer.phar install
Some of the external libraries that composer pulls down may require a svn checkout or git clone, so ensure you have these clients installed in step 1.
- [OPTIONAL] Install and enable the Application Request Routing module for IIS. This allows for "cleaner" URLs. If you have installed the ARR module, you can rename the web.config.iis file to web.config to activate ARR for the REST extension. For Apache, you can use the provided .htaccess file for clean URLs and skip this step.
You may also need to install the URL Rewrite module for IIS as well.
[OPTIONAL] On Linux, you may need to create a "templates_c" folder under the "cache" directory and give it sufficient permissions for the Smarty template engine to save compiled templates to. See Example 2.7 of the Smarty installation guide for more information. Additionally, Smarty may also complain about a default timezone not being set (this is raised as an exception). To avoid this exception, set a default timezone in php.ini and restart Apache
You can now access the REST endpoint at:
- http://yourservername:port/mapguide/rest/index.php (if you don't have ARR installed for IIS or mod_rewrite enabled for Apache)
Check out the wiki for additional information and documentation.
mapguide-rest is licensed under the GNU Lesser General Public License (LGPL) v2.1 (see LICENSE for more information)