[MapServer-dev] PHP mapscript-ng problem using map->setLayersDrawingOrder()
Worth Lutz
wal3 at mindspring.com
Tue Sep 24 04:48:27 PDT 2024
Hi Seth,
I also do not know the PHP C-API so cannot go that route. I had
considered using the moveLayer functions to solve my problem and will
have to go that route.
*Worth Lutz*
On 9/24/24 07:44, Seth G wrote:
> 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/db754756/attachment.htm>
More information about the MapServer-dev
mailing list