<div dir="ltr">Hi Steve,<div>My "mapfile" looks like this:</div><div><div><span style="white-space:pre">      </span>LAYER</div><div><span style="white-space:pre">         </span>DATA "mundo.shp"</div><div><span style="white-space:pre">            </span>NAME "mundoutfgrid"<br></div><div><span style="white-space:pre">               </span>UTFDATA   "{\'CNTRY_NAME\':\'[CNTRY_NAME]\'}"</div><div><span style="white-space:pre">             </span>UTFITEM   "FIPS_CNTRY"</div><div><span style="white-space:pre">            </span>STATUS OFF</div><div><span style="white-space:pre">            </span>TEMPLATE "none.htm"</div><div><span style="white-space:pre">         </span>TYPE POLYGON</div><div><span style="white-space:pre">          </span>CLASS</div><div><span style="white-space:pre">                 </span>NAME "" </div><div><span style="white-space:pre">                   </span>STYLE</div><div><span style="white-space:pre">                         </span>COLOR 230 230 230</div><div><span style="white-space:pre">                             </span>OUTLINECOLOR 255 255 255</div><div><span style="white-space:pre">                      </span>END</div><div><span style="white-space:pre">           </span>END</div><div><span style="white-space:pre">   </span>END</div></div><div><br></div><div>I solved the problem using metadata:</div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre">              </span>METADATA<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre">                   </span>"UTFITEM" "FIPS_CNTRY"<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre">                 </span>"UTFDATA" "{\"CNTRY_NAME\":\"[CNTRY_NAME]\"}"</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:small;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><span style="white-space:pre">                </span>END</div><br></div><div>With PHP-Mapscript I do the replacement:<br></div><div><br></div><div>$layer->updateFromString("LAYER UTFITEM '" . $layer->getmetadata("UTFITEM") . "' END");<br></div><div>$layer->updateFromString("LAYER UTFDATA '" . $layer->getmetadata("UTFDATA") . "' END");<br></div><div><br></div><div>Thanks.</div></div><div class="gmail_extra"><br><div class="gmail_quote">2018-02-02 20:08 GMT-02:00 Lime, Steve D (MNIT) <span dir="ltr"><<a href="mailto:steve.lime@state.mn.us" target="_blank">steve.lime@state.mn.us</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_8113552617054064747WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Can you post what the layer definition *<b>should</b>* look like? It’s possible the PHP code wasn’t updated. Perhaps there’s a workaround using some of the OWS
 metadata since most output drivers will support a variety of means of configuration.<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> mapserver-users [mailto:<a href="mailto:mapserver-users-bounces@lists.osgeo.org" target="_blank">mapserver-users-<wbr>bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>Moretti Edmar<br>
<b>Sent:</b> Thursday, February 01, 2018 12:46 PM<br>
<b>To:</b> MapserverList OSGEO <<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.osgeo.<wbr>org</a>><br>
<b>Subject:</b> [mapserver-users] UTFGRID and Mapscript<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Is it possible to create a LAYER with PHP-Mapscript to use UTFGRID? Another problem, when I save a Mapfile, via PHP-Mapscript, the specific parameters of UTFGRID disappear. Sounds like a bug to me.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Can anybody help me?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Thanks.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<p class="MsoNormal">-- <u></u><u></u></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">______________________________<wbr>______________________________<wbr>_______________<u></u><u></u></p>
</div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span style="font-size:9.5pt">Edmar Moretti<u></u><u></u></span></p>
</div>
</div>
</div>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal">Para tirar dúvidas sobre o i3Geo utilize a lista de e-mails da OSGEO: <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><a href="https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo" target="_blank">https://lists.osgeo.org/cgi-<wbr>bin/mailman/listinfo/i3geo</a><u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Também no Slack e no Facebook<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div>___________________________________________________________________________</div><div><div style="font-size:12.8px"><div><div>Edmar Moretti<br></div></div></div></div><div><span style="font-size:12.8px"><br></span></div><div>Para tirar dúvidas sobre o i3Geo utilize a lista de e-mails da OSGEO: </div><div><a href="https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo" target="_blank">https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo</a></div><div>Também no Slack e no Facebook</div><div><br></div><div><br></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div>
</div>