Skip to content

geofac/mapguide-rest

 
 

Repository files navigation

mapguide-rest

Build Status Windows Build Status

mapguide-rest is a RESTful web extension for MapGuide Open Source that continues the ideas explored in mapguide4j and GeoREST projects

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:

WARNING: mapguide-rest is currently experimental and should only be used for testing/development purposes. Use at your own risk on production data

Requirements

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.

Setup

NOTE: For convenience, you should use one of the pre-packaged release distributions

  1. Ensure you have a git and svn client installed and this is accessible from the command-line.

  2. 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)

  3. Install PHP Composer if you have no done so already

  4. Run the following composer command from the root of your clone to pull down required vendor libraries

composer install

or

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.

  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.

  2. [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

  3. You can now access the REST endpoint at:

Documentation

Check out the wiki for additional information and documentation.

License

mapguide-rest is licensed under the GNU Lesser General Public License (LGPL) v2.1 (see LICENSE for more information)

About

REST Extension for MapGuide Open Source

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 69.2%
  • PHP 18.3%
  • HTML 10.4%
  • CSS 1.1%
  • Smarty 0.7%
  • XSLT 0.3%