php mapscript: iterate through all objects in a layer

Jacob Delfos jacob.delfos at MAUNSELL.COM
Mon Oct 25 21:34:09 PDT 2004


Hi All,

I'm working on a searchtool that, among other things, goes through the attributes, and zooms to the selected object using javascript. To do this, I iterate through all the objects, up to the object count.
I got the whole thing pretty much working, except that currently I find the number of objects in a layer by creating a shapefileObj object, and getting the "numshapes" variable. I guess this is not too clean, because there could be other types of layers. What is the most ideal way to iterate through all objects in a layer? Is it possible to find the total number of objects from a layer object, without having to create a shapefile object?

regards,

Jacob


JACOB DELFOS
SPATIAL INFORMATION ANALYST
Maunsell Australia Pty Ltd
629 Newcastle Street
Leederville WA 6007
PO Box 81
Leederville WA 6902
Western Australia
ABN 20 093 846 925

Tel     + 61 8 9281 6185
Fax    + 61 8 9281 6297
jacob.delfos at maunsell.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20041026/debfabbc/attachment.htm>


More information about the MapServer-users mailing list