[Mapserver-users] php mapScript: Problem with LayerObj class - maxfeatures
Inna Janssen
innaj@web.de
Fri, 9 Jan 2004 22:21:45 +0100
Hello,
I familiarizing myself with the mapScript language in php, trying out everything and
found a problem: I want to get all shape objects in a layer. I can get e.g. the first one
with $shape = $layer->getShape(-1,0);
But how do I find out how many shapes a layer has? There is the variable maxfeatures.
If I understand it correctly, a feature is only another word for a shape.
But when I get maxfeatures ($layer->maxfeatures) I only get the number -1!
When I enter a number above the maximum layer I get a fatal error.
(Fatal error: [MapServer Error]: msLayerGetShape(): Invalid feature id. in ... )
Does anyone know a solution to get the maximum number of shapes?
Inna
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users