Re: [mapserver-users] UTFGRID and Mapscript

2018-02-15 Thread Moretti Edmar
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) :

> 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-boun...@lists.osgeo.org] *On
> Behalf Of *Moretti Edmar
> *Sent:* Thursday, February 01, 2018 12:46 PM
> *To:* MapserverList OSGEO 
> *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
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users

Re: [mapserver-users] UTFGRID and Mapscript

2018-02-02 Thread Lime, Steve D (MNIT)
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-boun...@lists.osgeo.org] On 
Behalf Of Moretti Edmar
Sent: Thursday, February 01, 2018 12:46 PM
To: MapserverList OSGEO 
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


___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapserver-users