[MapServer-users] updating old php-mapscript functions to their SWIG versions in mapserver 8
Jeff McKenna
jmckenna at gatewaygeomatics.com
Sat Feb 22 07:38:31 PST 2025
Hi Jan,
I think I read your question too fast. I don't think my link helped
you, however I realized that the MS4W examples didn't include setting
WEB object metadata (I must have just gave examples in another email
thread). I tested that locally, and I've now added that example to the
docs:
//******
// set WEB object metadata
//******
$oMap->web->metadata->set("ows_title", "MS4W demo");
Regarding your question, I am not fully understanding what you want, as
you seem to agree/know the new way to set the WEB object metadata.
Long story short, you helped me, I didn't help you, ha.
-jeff
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
--
Jeff McKenna
GatewayGeo: Developers of MS4W, & offering MapServer Consulting/Dev
co-founder of FOSS4G
http://gatewaygeo.com/
More information about the MapServer-users
mailing list