[MapServer-dev] PHP mapscript-ng problem using map->setLayersDrawingOrder()
Seth G
sethg at geographika.co.uk
Tue Sep 24 04:44:15 PDT 2024
Hi,
You are correct re the note - this has only been implemented in Python MapScript - see https://github.com/MapServer/MapServer/blob/893d9a48e1956a1e039ce5e44eed5466dd5e7907/src/mapscript/python/pyextend.i#L268.
You could try and add an equivalent to the PHP MapScript but you'd need to know the PHP C-API (which I do not!). It would be added to https://github.com/MapServer/MapServer/blob/main/src/mapscript/phpng/php7module.i
Alternatively, you could write your own helper function in PHP using the moveLayerDown and moveLayerUp methods in mapObj and the mapscript.layerObj index property to get your desired layer order - https://mapserver.org/mapscript/mapscript-api/stub/mapscript.mapObj.html#mapscript.mapObj
Seth
--
web:https://geographika.net & https://mapserverstudio.net
mastodon: @geographika at mastodon.social
On Tue, Sep 24, 2024, at 1:20 PM, Worth Lutz via MapServer-dev wrote:
> Hi All,
>
> I'm trying to do an upgrade to MapServer v8 and Mapscript-ng. I'm unable to get $map->setLayersDrawingOrder($layerOrderArrayOfIntegers) to work. I get this error:
>
> Expected SWIGTYPE_p_int for argument 2 of mapObj_setLayersDrawingOrder
>
> I'm assuming it is because of this note in the documentation:
>
> Note Unless the proper typemap is implemented for the module’s language users will not be able to pass arrays or lists to this method and it will be unusable.
>
> I spent yesterday looking at SWIG and typemaps but as I do not use C I did not understand what I was reading.
>
> Is there anything I can do to use setLayersDrawingOrder in my code?
>
> Thanks,
> --
> *Worth Lutz*
>
> _______________________________________________
> MapServer-dev mailing list
> MapServer-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20240924/c006406c/attachment.htm>
More information about the MapServer-dev
mailing list