-
-
Notifications
You must be signed in to change notification settings - Fork 364
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PHPMapscript ]please add method mapObj->getAllGroupNames() #5763
Comments
|
@geographika and @jmckenna, what do you think? This request is to fill a gap between PHPMapScript and Swig. It's a map-level method and wraps msGetAllGroupNames()... I don't see anything similar where we return an array of strings in Swig. --Stee |
|
@sdlime from https://mapserver.org/mapscript/mapscript.html -
I think the C# bindings do have one though - https://github.com/mapserver/mapserver/blob/branch-7-2/mapscript/csharp/csmodule.i#L125 We'd have to create typemaps for the other language bindings to support these (as I understand it, unless newer versions of SWIG support this automatically). The typemap for Python from GDAL could probably be modified and used: https://github.com/OSGeo/gdal/blob/master/gdal/swig/include/python/typemaps_python.i#L1026 I'm not sure about PHP - it looks as though the PHPMapScript could maybe be adjusted and added to SWIG as a typemap. Any thoughts on use/support of Ruby, Java, TCL, and Perl bindings? |
|
I was hoping for - newer versions of SWIG support this automatically... ;-) Seems like a pretty common need IMHO but it doesn't look to be the case based on the docs, In terms of other languages, I would bet TCL see's almost no use - the others probably do. PHP-only could be considered as an initial target though. The other bindings don't know what they are missing... |
|
@thjack : maybe you can use this workaround ? function getAllGroupNames($mapObj)
{
$aGroups = [];
for ($i = 0; $i < $mapObj->numlayers; $i++) {
$layerObj = $mapObj->getLayer($i);
if (in_array($layerObj->group, $aGroups) === false) {
$aGroups[] = $layerObj->group;
}
}
return $aGroups;
}
``` |
please add all methods of mapscript I use pmapper and like keep using it
The text was updated successfully, but these errors were encountered: