Number of Layer Features

Fabio Leme de Almeida fabio at GEOJA.COM.BR
Wed Apr 11 11:43:02 PDT 2007


Tamas,

I'm using the following:

for (int i = 0; i < map.numlayers; i++)
{
	layerObj Layer = map.getLayer(i);
	numFeatures = Layer.numitems;
}

Like I have said, numFeatures always returns zero.
As you can see, I don't call the Layer.Open(); method. At this example, is
it necessary ?
When execute "layerObj Layer = map.getLayer(i);" the method "Open()" is not
internally called ?

Thank's again,

Fabio

Fabio Leme de Almeida
GeoJá Mapas Digitais
http://www.geoja.com.br


-----Original Message-----
From: Tamas Szekeres [mailto:szekerest at gmail.com] 
Sent: quarta-feira, 11 de abril de 2007 14:35
To: Fabio Leme de Almeida
Cc: MAPSERVER-USERS at lists.umn.edu
Subject: Re: [UMN_MAPSERVER-USERS] Number of Layer Features

Have you called layerObj.open() ?

Best regards,

Tamas

2007/4/10, Fabio Leme de Almeida <fabio at geoja.com.br>:
>
>
>
>
> Hello All,
>
>
>
> I'm using PostGres/Posgis.
>
>
>
> How can I get the number of features existing at one specific Layer ?
>
>
>
> I'm trying to use the attribute layerObj.numitems but it always returns 0
> (zero items).
>
>
>
> Help-me please !!  ;o)
>
>
>
> Thank's,
>
>
>
> Fabio
>
>



More information about the MapServer-users mailing list