Several tools exists to help maintaining and configuring mapserver mapfiles. MapStorer is a good example. All of the available tools provide a nice GUI and a storage database adapter.

What seems to be missing at the moment is a restful service. We’ve started working on a project that could fill this gap.

Recently, we’ve been actively working on a restful mapfile configuration service. The advantages of such a system are those of typical webservice:
  • fully decoupled from the GUI, the GUI could be written in any language that talks REST
  • plain text mapfiles as the storage system
The service is being written in PHP and the RESTFUL part is managed with PHP Tonic library. A few examples of typical URLs:
  • GET http://www.mymaps.com/maps – retrieve a list of mapfiles
  • POST http://www.mymaps.com/maps – creates a new mapfile with the JSON data passed on post
  • GET http://www.mymaps.com/maps/my_first_map.json – retrieve the map data as JSON
  • GET http://www.mymaps.com/maps/my_first_map.xml – retrieve the map data as XML
  • GET http://www.mymaps.com/maps/my_first_map.map – retrieve the map data as plain text mapfile
  • PUT http://www.mymaps.com/maps/my_first_map.json – alter the map with JSON data
  • PUT http://www.mymaps.com/maps/my_first_map.xml – alter the map with XML data
  • GET http://www.mymaps.com/maps/my_first_map.xml/layers – retrieve the map layers as XML
  • GET http://www.mymaps.com/maps/my_first_map.xml/layers/my_first_layer – retrieve the map layer data as XML