<div dir="ltr">Forwarding Steve L's response in case anyone's looking for a workable solution to this topic.<br><div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">---------- Forwarded message ---------<br>From: <b class="gmail_sendername" dir="auto">David Miller</b> <span dir="auto"><<a href="mailto:teknocreator@gmail.com" target="_blank">teknocreator@gmail.com</a>></span><br>Date: Tue, Sep 8, 2020 at 12:31 PM<br>Subject: Re: [mapserver-users] How to dynamically change MapServer's GRID MININTERVAL?<br>To: Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>><br></div><br><br><div dir="ltr"><div>Steve, <br></div><div><br></div><div>Thanks much for checking on this! Will discuss options with my dev team. <br></div><div><br></div><div>Just to note that this came about because we added an option to our display which would allow our customers to select the lat/lon line intervals. An Openlayers plugin will then take that interval value and display the lat/lon lines accordingly. However, there are issues with that plugin for areas spanning the dateline (which one of our regions does) where the plugin will only draw correctly if one is completely on one side of the dateline or another but not straddling it. Having lat/lon lines on the display is very helpful in the Pacific region since of course there aren't many land references. In any case, will work with the options we have.</div><div><br></div><div>Thanks again!<br></div><div><br></div><div>Dave M<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 4, 2020 at 1:15 PM Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="EN-US">
<div>
<p class="MsoNormal">I checked and none of the relevant grid keywords (GRID, MINTERVAL, LABELFORMAT) are recognized when in URL context. The latter form you mentioned would be correct if supported since there is only one grid per layer. You could enable by
editing maplexer.l if you absolutely needed it but I think multiple layers might be the cleaner approach regardless.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">--Steve <u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in">
<p class="MsoNormal"><b>From:</b> David Miller <<a href="mailto:teknocreator@gmail.com" target="_blank">teknocreator@gmail.com</a>> <br>
<b>Sent:</b> Friday, September 4, 2020 9:11 AM<br>
<b>To:</b> Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>><br>
<b>Subject:</b> Re: [mapserver-users] How to dynamically change MapServer's GRID MININTERVAL?<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<table style="width:100%" width="100%" cellspacing="0" cellpadding="0" border="0" align="left">
<tbody>
<tr>
<td style="background:rgb(255,200,69) none repeat scroll 0% 0%;padding:5.25pt 1.5pt"></td>
<td style="width:100%;background:rgb(255,243,221) none repeat scroll 0% 0%;padding:5.25pt 3.75pt 5.25pt 11.25pt" width="100%">
<div>
<div>
<p class="MsoNormal">
<b><span style="color:rgb(0,56,101)">This message may be from an external email source.</span></b><span style="color:rgb(0,56,101)"><u></u><u></u></span></p>
</div>
<div>
<p class="MsoNormal">
<span style="font-size:9pt;color:rgb(0,56,101)">Do not select links or open attachments unless verified. Report all suspicious emails to Minnesota IT Services Security Operations Center.<u></u><u></u></span></p>
</div>
</div>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><u></u> <u></u></p>
<div class="MsoNormal" style="text-align:center" align="center">
<hr width="100%" size="2" align="center">
</div>
<div>
<div>
<div>
<p class="MsoNormal">Steve,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks much! Okay, I could propose having multiple grid layer options (i.e. grid1, grid2, grid5, grid10) as you suggested to my dev app group. Like you said, common use cases. At present, we're allowing the user to select a grid interval
via an Openlayers plugin which unfortunately has issues extending past the dateline. Our Pacific region users, who would probably use this functionality most, pointed this issue out to us and hence why I looked into MS GRID functionality. The example I gave
would either return a parsing error or an ISE. It wasn't a consistent error that was returned from MS even though I was trying a complete refresh in the browser. I also tried map.layer[grid].grid=MININTERVAL+10 (or 5). In addition, in case I could just
rewrite the GRID section via the URL - map.layer[grid]=GRID+LABELFORMAT+DD+MININTERVAL+5+END.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks again for replying and will adjust based on your feedback.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Dave M<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">On Thu, Sep 3, 2020 at 11:00 PM Lime, Steve D (MNIT) <<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>> wrote:<u></u><u></u></p>
</div>
<blockquote style="border-color:currentcolor currentcolor currentcolor rgb(204,204,204);border-style:none none none solid;border-width:medium medium medium 1pt;padding:0in 0in 0in 6pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal">Hi David: That functionality was geared towards common use cases so I’d bet money it’s not supported but I’ll check the code to be sure. If you’re really just after 5 vs. 10 then
using multiple layers would be an easy work around (e.g. grid5 vs grid10). Note that we’re always interested in 500 errors so if you are able to pass along how you triggered one that would be helpful. --Steve<u></u><u></u></p>
<p class="MsoNormal"> <u></u><u></u></p>
<div>
<div style="border-style:solid none none;border-width:1pt medium medium;padding:3pt 0in 0in;border-color:currentcolor">
<p class="MsoNormal"><b>From:</b> mapserver-users <<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-bounces@lists.osgeo.org</a>>
<b>On Behalf Of </b>David Miller<br>
<b>Sent:</b> Thursday, September 3, 2020 8:08 AM<br>
<b>To:</b> <a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> [mapserver-users] How to dynamically change MapServer's GRID MININTERVAL?<u></u><u></u></p>
</div>
</div>
<div>
<div>
<div>
<p>I started looking into using something similar to this example of the GRID layer definition in a MapServer mapfile that will draw lat/lon line grid at least every 5 degrees:<u></u><u></u></p>
<pre><code>LAYER</code><u></u><u></u></pre>
<pre><code> NAME "grid"</code><u></u><u></u></pre>
<pre><code> METADATA</code><u></u><u></u></pre>
<pre><code> "DESCRIPTION" "Grid"</code><u></u><u></u></pre>
<pre><code> END</code><u></u><u></u></pre>
<pre><code> TYPE LINE</code><u></u><u></u></pre>
<pre><code> STATUS ON</code><u></u><u></u></pre>
<pre><code> CLASS</code><u></u><u></u></pre>
<pre><code> NAME "Graticule"</code><u></u><u></u></pre>
<pre><code> COLOR 0 0 0</code><u></u><u></u></pre>
<pre><code> LABEL</code><u></u><u></u></pre>
<pre><code> COLOR 255 0 0</code><u></u><u></u></pre>
<pre><code> FONT "sans"</code><u></u><u></u></pre>
<pre><code> TYPE truetype</code><u></u><u></u></pre>
<pre><code> SIZE 8</code><u></u><u></u></pre>
<pre><code> POSITION AUTO</code><u></u><u></u></pre>
<pre><code> PARTIALS FALSE</code><u></u><u></u></pre>
<pre><code> BUFFER 2</code><u></u><u></u></pre>
<pre><code> OUTLINECOLOR 255 255 255</code><u></u><u></u></pre>
<pre><code> END</code><u></u><u></u></pre>
<pre><code> END</code><u></u><u></u></pre>
<pre><code> PROJECTION</code><u></u><u></u></pre>
<pre><code> "init=epsg:4326"</code><u></u><u></u></pre>
<pre><code> END</code><u></u><u></u></pre>
<pre><code> GRID</code><u></u><u></u></pre>
<pre><code> LABELFORMAT '%g°'</code><u></u><u></u></pre>
<pre><code> MININTERVAL 5</code><u></u><u></u></pre>
<pre><code> END</code><u></u><u></u></pre>
<pre><code>END # Layer</code><u></u><u></u></pre>
<p>However, I don't want the MININTERVAL value to be hardcoded and would like to be able to vary that value by entering a different value in the URL call from a web page using the map_object notation. But, I've been unsuccessful. I have tried this in the URL
call to MapServer:<u></u><u></u></p>
<p>&map_layer[grid].grid[0]=MININTERVAL+10 #changing to 10 degrees instead of 5<u></u><u></u></p>
<p>using the second example at this link: <a href="https://gcc01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmapserver.org%2Fcgi%2Fcontrols.html%23cgi-mapfile-change-parameters&data=02%7C01%7Csteve.lime%40state.mn.us%7C5ad89fbe879e4906888a08d850dc4f36%7Ceb14b04624c445198f26b89c2159828c%7C0%7C1%7C637348254437461427&sdata=ewamejYAki238oP8%2Be5yIYOp62SR069PWsTn9USDo58%3D&reserved=0" target="_blank">
https://mapserver.org/cgi/controls.html#cgi-mapfile-change-parameters</a>. But, I either get a parsing error or an Internal Server error. I've tried turning debug level to 5 and looking at logs but they don't offer any help. Perhaps I'm just not using the correct
map_object notation, but I'm not sure what else to use given the examples in the link. I also attempted to look at the MapServer code to no avail.<u></u><u></u></p>
<p>Perhaps I just can't change this parameter via the URL? <u></u><u></u></p>
<p>I'm using MapServer v 7.2.2 but it seems like the GRID layer has been available for a while now.<u></u><u></u></p>
<p>Thanks for any help/suggestions/thoughts!<u></u><u></u></p>
<p>Dave M<u></u><u></u></p>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</div>
</div>
</blockquote></div>
</div></div></div>