<div dir="ltr">
<div class="gmail-s-prose gmail-js-post-body">
<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:</p>
<pre><code>LAYER
NAME "grid"
METADATA
"DESCRIPTION" "Grid"
END
TYPE LINE
STATUS ON
CLASS
NAME "Graticule"
COLOR 0 0 0
LABEL
COLOR 255 0 0
FONT "sans"
TYPE truetype
SIZE 8
POSITION AUTO
PARTIALS FALSE
BUFFER 2
OUTLINECOLOR 255 255 255
END
END
PROJECTION
"init=epsg:4326"
END
GRID
LABELFORMAT '%g°'
MININTERVAL 5
END
END # Layer
</code></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:</p>
<p>&map_layer[grid].grid[0]=MININTERVAL+10 #changing to 10 degrees instead of 5</p>
<p>using the second example at this link: <a href="https://mapserver.org/cgi/controls.html#cgi-mapfile-change-parameters" rel="nofollow noreferrer">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.</p><p>Perhaps I just can't change this parameter via the URL? <br></p>
<p>I'm using MapServer v 7.2.2 but it seems like the GRID layer has been available for a while now.</p><p>Thanks for any help/suggestions/thoughts!</p><p>Dave M<br></p>
</div>
</div>