[mapserver-commits] r7466 - trunk/docs/references/cgi
svn at osgeo.org
svn at osgeo.org
Wed Mar 19 17:09:15 EDT 2008
Author: jmckenna
Date: 2008-03-19 17:09:15 -0400 (Wed, 19 Mar 2008)
New Revision: 7466
Modified:
trunk/docs/references/cgi/mapcontext.txt
Log:
converted to rST format
Modified: trunk/docs/references/cgi/mapcontext.txt
===================================================================
--- trunk/docs/references/cgi/mapcontext.txt 2008-03-19 20:11:37 UTC (rev 7465)
+++ trunk/docs/references/cgi/mapcontext.txt 2008-03-19 21:09:15 UTC (rev 7466)
@@ -1,37 +1,37 @@
-<h2>Support for Local Map Context Files</h2>
+Support for Local Map Context Files
+-----------------------------------
-There is a new cgi parameter called CONTEXT that is used to specify a local
+There is a CGI parameter called CONTEXT that is used to specify a local
context file. The user can then use MapServer to request a map using the
following syntax:
-<pre>
+::
+
http://localhost/mapserver.cgi?MODE=map&MAP=/path/to/mapfile.map&CONTEXT=
/path/to/contextfile.xml&LAYERS=layer_name1 layers_name2
-</pre>
-<dl>
-<dt>Note</dt>
- <dd>All layers created from a context file have their status set to ON. To be
- able to display layers, the user needs to add the LAYERS argument in the URL.
- </dd>
-</dl>
+*Note* All layers created from a context file have their status set to ON. To be
+able to display layers, the user needs to add the LAYERS argument in the URL.
-<h2>Support for Context Files Accessed Through a URL</h2>
+Support for Context Files Accessed Through a URL
+------------------------------------------------
The syntax of using a web accessible context file would be similar to
accessing a local context file:
-<pre>
+::
+
http://localhost/mapserver.cgi?MODE=map&MAP=/path/to/mapfile.map&CONTEXT=
http://URL/path/to/contextfile.xml&LAYERS=layers_name1 layer_name2
-</pre>
+
Due to security concerns loading a file from a URL is disabled by default. To
enable this functionality, the user needs to set a CONFIG parameter called
CGI_CONTEXT_URL in the default map file that will allow this functionality.
Here is an example of a map file with the CONFIG parameter:
-<pre>
+::
+
# Start of map file
NAME DEMO
STATUS ON
@@ -42,9 +42,9 @@
IMAGETYPE png
CONFIG "CGI_CONTEXT_URL" "1"
...
-</pre>
-<h2>Default Map File</h2>
+Default Map File
+----------------
To smoothly run a Mapserver CGI application with a Map Context, the
application administrator needs to provide a default map file with at least
@@ -57,7 +57,8 @@
Here is an example of a default map file containing the minimum
required parameters:
-<pre>
+::
+
NAME CGI-CONTEXT-DEMO
STATUS ON
SIZE 400 300
@@ -79,4 +80,3 @@
IMAGEURL "/ms_tmp/"
END
END # Map File
-</pre>
\ No newline at end of file
More information about the mapserver-commits
mailing list