[MapServer-users] updating old php-mapscript functions to their SWIG versions in mapserver 8
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Feb 22 06:35:33 PST 2025
Hi Jan,
MS4W users have contributed several PHPNG scripts, on the wiki, that
also includes: metadata->set("wms_name", "popplace") such as
https://ms4w.com/trac/wiki/SWIGMapScriptNewLayer
See other examples at https://ms4w.com/trac/#AdditionalNotesTips
thanks,
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
On 2025-02-22 8:34 a.m., Jan Hartmann via MapServer-users wrote:
> Hi all,
>
> I finally got mapserver 8.0.1 running in a clean Docker Ubuntu image,
> using the regular apt packages mapserver-bin and php-mapscript-ng.
> Thanks to Rich Greenwood for referring me to the php-mapscript-ng
> package, it's difficult to find. BTW, who manages this package, so I can
> inquire for the version for mapserver 8.4?
>
> I am now updating all my mapserver 7 sites, the ones without SWIG PHP-
> Mapscript. Some PHP functions can be easily redefined in a header file,
> like:
>
> function ms_newMapObj($mapFile) {return new mapObj ($mapFile);}
>
> But I have not yet found out how to do this for object functions like
>
> mapObj->setMetadata($param1,$param2)
>
> This has to be changed to
>
> mapObj->web->metadata->set($param1,$param2).
>
> I tried things like:
>
> mapObj->setMetadata($param1,$param2) = function ($param1,$param2)
> { $this->web->metadata->set($param1,$param2)};
>
> But this does not work. Does anyone know how to do it? Is it possible at
> all in PHP? If not, I have to convert all expressions like this in all
> my scripts by hand.
>
> Jan
> _______________________________________________
> MapServer-users mailing list
> MapServer-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list