Outputformat obj can contains FORMATOPTION parameters. In python we can't get any list of existing FORMATOPTION, so we should know which are used:
>>> map = mapscript.mapObj('data/world_mapfile.map')
>>> of = map.getOutputFormatByName('png24')
add missing functions to outputformatObj that allow iterating over th…
…e format's OPTIONS #4553
@yjacolin Can you take a look at the above pr before I merge it?
@unicolet sorry I have not tested this yet. I will try it tonight.
Documented the new methods in the docs:
I think I built successfully Python/MapScript, but:
map = mapscript.mapObj("mapfile.map")
of = map.getOutputFormatByName('png24')
but I have no getNumformatoptions() or getOptionAt() methods.
mapscript.MS_VERSION shows 6.3-dev
and I used: git://github.com/unicolet/mapserver.git
Works for me. Did you run make install?
Python 2.7.3 (default, Aug 1 2012, 05:16:07)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mapscript
>>> map = mapObj('../../tests/test.map')
>>> of = map.getOutputFormat(0)
yes I did it. I will do more test this week-end. Sorry for this delay.
@unicolet I successfuly build mapserver and test your new method (note to myself: please use the correct branch next time). Here are my comments:
option = of.getOptionAt(0)
dir(option) don't show any property, am I wrong?
Can you share a meaningful map file together with the expected list of options?
As per the methods names I am pretty sure I got them right in the docs, I will run some more python tests soon.
Closed in pull request referenced above
@unicolet this issue is milestoned for 6.2.1 but has only been applied to master. Should the milestone be updated or should I backport ?
re-milestoning to 6.4