<html>
<head>
<style type="text/css">
<!--
body { margin-left: 4px; margin-top: 4px; margin-bottom: 1px; margin-right: 4px; font-variant: normal; line-height: normal }
p { margin-top: 0; margin-bottom: 0 }
-->
</style>
</head>
<body style="margin-left: 4px; margin-top: 4px; margin-bottom: 1px; margin-right: 4px">
<p style="margin-top: 0; margin-bottom: 0">
<font face="Comic Sans MS" size="3">All,</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Comic Sans MS" size="3">I don't see the TEMPLATE route as being any more (or less) of a problem in adding as a method to achieve the desired results, and it leaves a measure of flexibility behind as well. I mean if you need a MAPFILE anyway, what's the difference in adding a TEMPLATE for use as well.</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<font face="Comic Sans MS" size="3">bobb</font> </p>
<br>
<p style="margin-top: 0; margin-bottom: 0">
<br>
<br>
>>> Daniel Morissette <dmorissette@mapgears.com> wrote:<br> </p>
<div style="margin-left: 15px; padding-left: 7px; margin-top: 0; margin-bottom: 0; margin-right: 0; border-left: solid 1px #050505; background-color: #f3f3f3">
<p style="margin-top: 0; margin-bottom: 0">
The need I'm trying to address is the ability for mapfile developers to<br>quickly test a mapfile just by typing a simple URL in their web browser.<br>While I can appreciate that admin tools and generic templates for all<br>sorts of viewers and frameworks would be nice to have, that is out of<br>scope for what I am currently proposing.<br><br>What I propose is to add a simple function to mapserv.c (just a few<br>lines, really) that will spit out a few lines of HTML/JavaScript to<br>instantiate a very simple OpenLayers based viewer for a given mapfile<br>in response to a mapserv CGI request with mode=openlayers or a WMS<br>GetMap request with format=application/openlayers. I do not envision the<br>use of external or configurable templates for this since that would<br>imply dependencies on external files an I would ideally like something<br>really simple aimed at mapfile developers that works out of the box with<br>just the standalone mapserv executable and a regular mapfile without any<br>special configuration.<br><br>Does my explanation make sense? Is this not considered useful enough by<br>itself to justify adding to the mapserv CGI? If there are no objections<br>to this little addition then I will write a RFC for it.<br><br>Daniel<br><br><br>Lime, Steve D (DNR) wrote:<br>> So where are we at? I do like the idea. The technical solution, IMHO,<br>> will probably point to how this might work operationally. For example,<br>> if the plan were to simply embed a HTML/OL template in code then a<br>> mode=openlayers would make sense. However, if the template were stored<br>> externally and a basic one shipped with MapServer then I’d opt for<br>> mode=browse&template=openlayers. The advantage of the external templates<br>> is extensibility and users could edit the one(s) provided or add their<br>> own. They could also disable the functionality altogether by removing<br>> all templates. The downside is setting up access and then security. If<br>> external templates used the templating code and magic strings that would<br>> mitigate many issues…<br>><br>> <br>><br>> Steve<br>><br>> <br>><br>> *From:* mapserver-dev-bounces@lists.osgeo.org<br>> [mailto:mapserver-dev-bounces@lists.osgeo.org] *On Behalf Of *Tamas Szekeres<br>> *Sent:* Friday, September 24, 2010 4:46 PM<br>> *To:* Daniel Morissette<br>> *Cc:* MapServer Dev List<br>> *Subject:* Re: [mapserver-dev] Proposal to add built-in OpenLayers map<br>> viewer<br>><br>> <br>><br>> Daniel,<br>><br>> Adding a viewer with zoom and pan capabilities is a good idea which is<br>> better then having a single image in some cases. I foresee a reasonable<br>> Web administration interface to mapserver could also be established by<br>> such additions which would be a requirement too.<br>> However embedding code from a separate project seems to be a hassle,<br>> though the technical solution hasn't yet been mentioned in the ticket.<br>><br>> I would be in favour of doing either:<br>><br>> 1. Create a simple  (mapserver specific) .js to provide the required<br>> functionality (which could be extended later with further options)<br>> 2. Provide a (pluggable) interface for use by the potential viewers in<br>> mapserver, and  create a separate support package for at least one (like<br>> openlayers for instance) and include the external code to this package.<br>><br>><br>> (Just to put my 2 cents in)<br>><br>> Best regards,<br>><br>> Tamas<br>><br>><br>><br>><br>> 2010/9/24 Daniel Morissette <dmorissette@mapgears.com<br>> <mailto:dmorissette@mapgears.com>><br>><br>> This was discussed at the code sprint in Barcelona, and I just created a<br>> ticket for it. We'd like to add this to 6.0... but I am realizing just<br>> now that maybe I should start with a RFC...<br>><br>> Anyway, here is what I wrote in the ticket, please feel free to comment,<br>> keeping in mind this has to remain __simple__:<br>><br>> <a href="http://trac.osgeo.org/mapserver/ticket/3549">http://trac.osgeo.org/mapserver/ticket/3549</a><br>><br>> Every once in a while we get requests for a simple way to test a<br>> mapfile. One way to handle this could be to do as GeoServer does and<br>> provide a built-in OpenLayers based map viewer. In the GeoServer case,<br>> this viewer is returned when one issues a WMS GetMap request with<br>> format=application/openlayers in it.<br>><br>> I propose that we provide a similar functionality in MapServer, which<br>> would be triggered in one of two ways:<br>><br>> 1- Using mapserv?map=/path/to/my.map&'''mode=openlayers''' ... in this<br>> case the viewer would be initialized based on the mapfile defaults, and<br>> some of the traditional mapserv CGI params may also work (such as map<br>> size, layer selection, etc.)<br>><br>> 2- Using '''format=application/openlayers''' in a WMS GetMap request as<br>> GeoServer does. Note that in this case the rest of the GetMap parameters<br>> would be used to configure the map to view (BBOX, WIDTH, HEIGHT, LAYERS,<br>> etc.)<br>><br>> Both cases would call the same function internally to produce a simple<br>> OpenLayeres viewer with one singletile layer for the whole map with the<br>> selected layers.<br>><br>><br>> --<br>> Daniel Morissette<br>> <a href="http://www.mapgears.com/">http://www.mapgears.com/</a><br>> _______________________________________________<br>> mapserver-dev mailing list<br>> mapserver-dev@lists.osgeo.org <mailto:mapserver-dev@lists.osgeo.org><br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br>><br>> <br>><br>><br>> ------------------------------------------------------------------------<br>><br>> _______________________________________________<br>> mapserver-dev mailing list<br>> mapserver-dev@lists.osgeo.org<br>> <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br><br><br>--<br>Daniel Morissette<br><a href="http://www.mapgears.com/">http://www.mapgears.com/</a><br>_______________________________________________<br>mapserver-dev mailing list<br>mapserver-dev@lists.osgeo.org<br><a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br>
</p>
</div>
</body>
</html>