[OpenLayers-Users] Cannot cycle through vector layer features

Ivan Grcic igrcic at gmail.com
Wed Jan 28 11:43:49 EST 2009


Hi,

what happens if u do something like this:

setTimeout(function(){alert(overlay.features.length), 3000});


On Wed, Jan 28, 2009 at 5:06 PM, goliah <bianchimro at gmail.com> wrote:
>
> Dear all,
>
> I want to cycle through a vector layer (GML in my case) features.
> The layer loads and it's drawn, but i cannot access the features at all
>
> example:
>
> var overlay; //global variable
>
> overlay = new OpenLayers.Layer.GML("GML", 'file.gml');
>
> var l = overlay.features.length;   // this is ALWAYS 0!
>
> The strange thing is that, using firebug and watching the expression
> "overlay.features.length" gives me the right number of features.
>
> Any idea?
> Thanks
> Mauro
>
>
> --
> View this message in context: http://n2.nabble.com/Cannot-cycle-through-vector-layer-features-tp2233009p2233009.html
> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
Ivan Grcic



More information about the Users mailing list