<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&#44;</font>    </p>
<br>      
    <p style="margin-top: 0; margin-bottom: 0">
      <font face="Comic Sans MS" size="3">I don&#39;t see the TEMPLATE route as being any more &#40;or less&#41; of a problem in adding as a method to achieve the desired results&#44; and it leaves a measure of flexibility behind as well. I mean if you need a MAPFILE anyway&#44; what&#39;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>
      &gt;&gt;&gt; Daniel Morissette &lt;dmorissette@mapgears.com&gt; 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&#39;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&#44; 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 &#40;just a few<br>lines&#44; really&#41; 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&#61;openlayers or a WMS<br>GetMap request with format&#61;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&#63; Is this not considered useful enough by<br>itself to justify adding to the mapserv CGI&#63; 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&#44; Steve D &#40;DNR&#41; wrote:<br>&gt; So where are we at&#63; I do like the idea. The technical solution&#44; IMHO&#44;<br>&gt; will probably point to how this might work operationally. For example&#44;<br>&gt; if the plan were to simply embed a HTML/OL template in code then a<br>&gt; mode&#61;openlayers would make sense. However&#44; if the template were stored<br>&gt; externally and a basic one shipped with MapServer then I&#8217;d opt for<br>&gt; mode&#61;browse&amp;template&#61;openlayers. The advantage of the external templates<br>&gt; is extensibility and users could edit the one&#40;s&#41; provided or add their<br>&gt; own. They could also disable the functionality altogether by removing<br>&gt; all templates. The downside is setting up access and then security. If<br>&gt; external templates used the templating code and magic strings that would<br>&gt; mitigate many issues&#8230;<br>&gt;<br>&gt;&#160;<br>&gt;<br>&gt; Steve<br>&gt;<br>&gt;&#160;<br>&gt;<br>&gt; &#42;From:&#42; mapserver-dev-bounces@lists.osgeo.org<br>&gt; &#91;mailto:mapserver-dev-bounces@lists.osgeo.org&#93; &#42;On Behalf Of &#42;Tamas Szekeres<br>&gt; &#42;Sent:&#42; Friday&#44; September 24&#44; 2010 4:46 PM<br>&gt; &#42;To:&#42; Daniel Morissette<br>&gt; &#42;Cc:&#42; MapServer Dev List<br>&gt; &#42;Subject:&#42; Re: &#91;mapserver-dev&#93; Proposal to add built-in OpenLayers map<br>&gt; viewer<br>&gt;<br>&gt;&#160;<br>&gt;<br>&gt; Daniel&#44;<br>&gt;<br>&gt; Adding a viewer with zoom and pan capabilities is a good idea which is<br>&gt; better then having a single image in some cases. I foresee a reasonable<br>&gt; Web administration interface to mapserver could also be established by<br>&gt; such additions which would be a requirement too.<br>&gt; However embedding code from a separate project seems to be a hassle&#44;<br>&gt; though the technical solution hasn&#39;t yet been mentioned in the ticket.<br>&gt;<br>&gt; I would be in favour of doing either:<br>&gt;<br>&gt; 1. Create a simple&#160;&nbsp;&#40;mapserver specific&#41; .js to provide the required<br>&gt; functionality &#40;which could be extended later with further options&#41;<br>&gt; 2. Provide a &#40;pluggable&#41; interface for use by the potential viewers in<br>&gt; mapserver&#44; and&#160;&nbsp;create a separate support package for at least one &#40;like<br>&gt; openlayers for instance&#41; and include the external code to this package.<br>&gt;<br>&gt;<br>&gt; &#40;Just to put my 2 cents in&#41;<br>&gt;<br>&gt; Best regards&#44;<br>&gt;<br>&gt; Tamas<br>&gt;<br>&gt;<br>&gt;<br>&gt;<br>&gt; 2010/9/24 Daniel Morissette &lt;dmorissette@mapgears.com<br>&gt; &lt;mailto:dmorissette@mapgears.com&gt;&gt;<br>&gt;<br>&gt; This was discussed at the code sprint in Barcelona&#44; and I just created a<br>&gt; ticket for it. We&#39;d like to add this to 6.0... but I am realizing just<br>&gt; now that maybe I should start with a RFC...<br>&gt;<br>&gt; Anyway&#44; here is what I wrote in the ticket&#44; please feel free to comment&#44;<br>&gt; keeping in mind this has to remain __simple__:<br>&gt;<br>&gt; <a href="http://trac.osgeo.org/mapserver/ticket/3549">http://trac.osgeo.org/mapserver/ticket/3549</a><br>&gt;<br>&gt; Every once in a while we get requests for a simple way to test a<br>&gt; mapfile. One way to handle this could be to do as GeoServer does and<br>&gt; provide a built-in OpenLayers based map viewer. In the GeoServer case&#44;<br>&gt; this viewer is returned when one issues a WMS GetMap request with<br>&gt; format&#61;application/openlayers in it.<br>&gt;<br>&gt; I propose that we provide a similar functionality in MapServer&#44; which<br>&gt; would be triggered in one of two ways:<br>&gt;<br>&gt; 1- Using mapserv&#63;map&#61;/path/to/my.map&amp;&#39;&#39;&#39;mode&#61;openlayers&#39;&#39;&#39; ... in this<br>&gt; case the viewer would be initialized based on the mapfile defaults&#44; and<br>&gt; some of the traditional mapserv CGI params may also work &#40;such as map<br>&gt; size&#44; layer selection&#44; etc.&#41;<br>&gt;<br>&gt; 2- Using &#39;&#39;&#39;format&#61;application/openlayers&#39;&#39;&#39; in a WMS GetMap request as<br>&gt; GeoServer does. Note that in this case the rest of the GetMap parameters<br>&gt; would be used to configure the map to view &#40;BBOX&#44; WIDTH&#44; HEIGHT&#44; LAYERS&#44;<br>&gt; etc.&#41;<br>&gt;<br>&gt; Both cases would call the same function internally to produce a simple<br>&gt; OpenLayeres viewer with one singletile layer for the whole map with the<br>&gt; selected layers.<br>&gt;<br>&gt;<br>&gt; --<br>&gt; Daniel Morissette<br>&gt; <a href="http://www.mapgears.com/">http://www.mapgears.com/</a><br>&gt; _______________________________________________<br>&gt; mapserver-dev mailing list<br>&gt; mapserver-dev@lists.osgeo.org &lt;mailto:mapserver-dev@lists.osgeo.org&gt;<br>&gt; <a href="http://lists.osgeo.org/mailman/listinfo/mapserver">http://lists.osgeo.org/mailman/listinfo/mapserver</a>-dev<br>&gt;<br>&gt;&#160;<br>&gt;<br>&gt;<br>&gt; ------------------------------------------------------------------------<br>&gt;<br>&gt; _______________________________________________<br>&gt; mapserver-dev mailing list<br>&gt; mapserver-dev@lists.osgeo.org<br>&gt; <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>