![]() |
|
Cgi protocolIn order to allow html-javascript navigation of maps i wrote a couple of cgi to stand in the middle between the javascript and the server: map and info. Here is a description of the protocol to be used to obtain a map or an html page, it has the same structure of the request protocol They translate a CGI request into an XML one, open a connection with grulesd and deliver the response. Usually grulesd will run on the same machine listening on port 6148. It may however run on another machine or another port. In that case a file named 'grules.cfg' needs to be created in the same directory where the cgi are, with only a line in it, containing address and port where the server is located. Should the server be unavailable, error messages can be customized with html files and images, just put in the same directory as 'grules' is the following files:
OverviewThis protocol i really a literal translation of the Xml one. Here is a minimal example:/cgi-bin/grl/map?project=PROJECT®ion=X:Y:N:S:E:W&THEME1&THEME2Where one should obviously substitute PROJECT with the default project, and all other variables as appropriate. Each theme request can be further specified using '|' as a separator and the following queries:
When requesting an 'info' the rules are the same only a template (.grml) will be used to return information. On default the template will have the same name of the default project (like industry.grml for a project industry) and should be located in the info cgi directory. |
| Table of contents | Home |