[MapServer-users] updating old php-mapscript functions to their SWIG versions in mapserver 8
Jan Hartmann
j.l.h.hartmann at gmail.com
Sat Feb 22 04:34:29 PST 2025
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
More information about the MapServer-users
mailing list