[mapserver-users] UTFGRID and Mapscript
Moretti Edmar
edmar.moretti at gmail.com
Thu Feb 15 09:39:16 PST 2018
Hi Steve,
My "mapfile" looks like this:
LAYER
DATA "mundo.shp"
NAME "mundoutfgrid"
UTFDATA "{\'CNTRY_NAME\':\'[CNTRY_NAME]\'}"
UTFITEM "FIPS_CNTRY"
STATUS OFF
TEMPLATE "none.htm"
TYPE POLYGON
CLASS
NAME ""
STYLE
COLOR 230 230 230
OUTLINECOLOR 255 255 255
END
END
END
I solved the problem using metadata:
METADATA
"UTFITEM" "FIPS_CNTRY"
"UTFDATA" "{\"CNTRY_NAME\":\"[CNTRY_NAME]\"}"
END
With PHP-Mapscript I do the replacement:
$layer->updateFromString("LAYER UTFITEM '" . $layer->getmetadata("UTFITEM")
. "' END");
$layer->updateFromString("LAYER UTFDATA '" . $layer->getmetadata("UTFDATA")
. "' END");
Thanks.
2018-02-02 20:08 GMT-02:00 Lime, Steve D (MNIT) <steve.lime at state.mn.us>:
> Can you post what the layer definition **should** 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.
>
>
>
> *From:* mapserver-users [mailto:mapserver-users-bounces at lists.osgeo.org] *On
> Behalf Of *Moretti Edmar
> *Sent:* Thursday, February 01, 2018 12:46 PM
> *To:* MapserverList OSGEO <mapserver-users at lists.osgeo.org>
> *Subject:* [mapserver-users] UTFGRID and Mapscript
>
>
>
> Hi,
>
>
>
> 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.
>
>
>
> Can anybody help me?
>
>
>
> Thanks.
>
>
>
> --
>
> ____________________________________________________________
> _______________
>
> Edmar Moretti
>
>
>
> Para tirar dúvidas sobre o i3Geo utilize a lista de e-mails da OSGEO:
>
> https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
>
> Também no Slack e no Facebook
>
>
>
>
>
--
___________________________________________________________________________
Edmar Moretti
Para tirar dúvidas sobre o i3Geo utilize a lista de e-mails da OSGEO:
https://lists.osgeo.org/cgi-bin/mailman/listinfo/i3geo
Também no Slack e no Facebook
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20180215/81275410/attachment.htm>
More information about the MapServer-users
mailing list