[mapserver-commits] r10672 - trunk/docs/en/development/rfc
svn at osgeo.org
svn at osgeo.org
Tue Oct 26 09:50:41 EDT 2010
Author: aboudreault
Date: 2010-10-26 06:50:41 -0700 (Tue, 26 Oct 2010)
New Revision: 10672
Added:
trunk/docs/en/development/rfc/ms-rfc-63.txt
Log:
Added RFC-63
Added: trunk/docs/en/development/rfc/ms-rfc-63.txt
===================================================================
--- trunk/docs/en/development/rfc/ms-rfc-63.txt (rev 0)
+++ trunk/docs/en/development/rfc/ms-rfc-63.txt 2010-10-26 13:50:41 UTC (rev 10672)
@@ -0,0 +1,138 @@
+.. _rfc63:
+
+===============================================================
+ MS RFC 63: Built-in OpenLayers map viewer
+===============================================================
+
+:Date: 2010/09/25
+:Author: Daniel Morissette (dmorissette at mapgears.com)
+:Author: Alan Boudreault (aboudreault at mapgears.com)
+:Last Edited: $Date: 2010-09-28 17:40:49 -0400 (Tue, 28 Sep 2010) $
+:Status: Not Adopted
+:Id: $Id: ms-rfc-63.txt 10532 2010-09-28 21:40:49Z tamas $
+
+Overview
+------------------------------------------------------------------------------
+
+Users often request for a simple way to test mapfiles. This RFC proposes a
+**simple** way to preview, test and navigate a mapfile with MapServer using
+a built-in OpenLayers based map viewer that will be triggered via the
+cgi. This is for testing/development purposes only and not for production or
+deploying full-featured sites. This will use the a built-in **openlayers**
+template. It will return a simple html viewer based on OpenLayers.
+
+Note that GeoServer already provides a similar functionnality and this is
+what this RFC was inspired from.
+
+
+Implementation Details
+------------------------------------------------------------------------------
+
+In order to implement this enhancement, the following changes should be
+made in the MapServer codebase:
+
+
+* Add a built-in **openlayers** template.
+
+* Some new template tags will be needed. These tags will be used to
+ construct the mapserver cgi url.
+
+ - [mapserv_onlineresource]
+
+ **or**
+
+ - [protocol]
+ - [host]
+ - [program]
+
+ See `ticket 3552 <http://trac.osgeo.org/mapserver/ticket/3552>`_ for more detail.
+
+
+The template will be triggered using one of the following ways:
+
+* Using **mode=browse&template=openlayers**: The viewer will be initialized
+ based on the mapfile defaults, and some of the traditional mapserv CGI
+ params may also work (such as map size, layer selection, etc.)
+
+* Using **FORMAT=application/openlayers**: The rest of the GetMap
+ parameters would be used to configure the map to view (BBOX, WIDTH,
+ HEIGHT, LAYERS, etc.)
+
+Both cases would call the same functions internally to produce a simple
+OpenLayers viewer with one singletile layer for the whole map with the
+selected layers.
+
+Here's the simple viewer html code that could be used:
+
+::
+
+ <html>
+ <head>
+ <title>MapServer Simple Viewer</title>
+ <script src="http://www.mapserver.org/lib/OpenLayers-ms60.js"></script>
+ </head>
+ <body>
+ <div style="width:[mapwidth]; height:[mapheight]" id="map"></div>
+ <script defer="defer" type="text/javascript">
+ var map = new OpenLayers.Map('map',
+ {maxExtent: new OpenLayers.Bounds([minx],[miny],[maxx],[maxy]),
+ maxResolution: [cellsize]} );
+
+ var mslayer = new OpenLayers.Layer.MapServer( "MapServer Layer",
+ "[mapserv_onlineresource]",
+ {layers: '[layers]'},
+ {singleTile: "true", ratio:1} );
+ map.addLayer(mslayer);
+ map.zoomToMaxExtent();
+ </script>
+ </body>
+ </html>
+
+
+
+OpenLayers Dependency
+------------------------------------------------------------------------------
+
+Obviously, this functionnality needs the OpenLayers javascript library. A
+minimal build will be used and hosted on the MapServer website. Users
+will be able to use their own OpenLayers library in one of two ways:
+
+* Using a environment variable: by setting the environment variable
+ MS_OPENLAYERS_JS_URL, MapServer will use that url rather than the default
+ one.
+
+* Using a CONFIG setting in the mapfile: by adding the config variable
+ MS_OPENLAYERS_JS_URL in a mapfile, MapServer will use that url rather than
+ the default one.
+
+
+Files affected
+------------------------------------------------------------------------------
+
+To determine...
+
+Further Considerations
+------------------------------------------------------------------------------
+
+In the future, we may provide a mechanism to support multiple frameworks
+and ship generic templates with MapServer.
+
+Bug ID
+------------------------------------------------------------------------------
+
+The ticket for RFC-63 (containing the implementation) can be found here.
+
+Bug 3549_
+
+.. _3549: http://trac.osgeo.org/mapserver/ticket/3549
+
+Bug 3552_
+
+.. _3552: http://trac.osgeo.org/mapserver/ticket/3552
+
+Voting history
+------------------------------------------------------------------------------
+
+No vote yet
+
+
More information about the mapserver-commits
mailing list