[OpenLayers-Users] Limit number of items they are displayed

TrouveTonGull contact at trouvetongull.info
Mon Nov 9 08:12:57 EST 2009


On 09.11.2009 13:11, Andreas Hocevar wrote:
>
> How would you read a XML with GeoRSS? If you are doing WFS, you can use
> maxFeatures to limit the number of results.
>
> Regards,
> Andreas.
>    

Hi Andreas,

i read a xml file like this:

           var yelp = new OpenLayers.Icon("radar.png", new 
OpenLayers.Size(35,35));
     var newl1 = new OpenLayers.Layer.GeoRSS( 'Agenda', 'events.xml', 
{'icon':yelp}, maxfeatures: 10);
     map.addLayer(newl1, popupClass);


I'm not sure that maxfeatures is at the correct place (don't works 
actually) :)

The file event.xml have 100-200 items , so i want just show the first 10 
items

Thanks,

Fred



More information about the Users mailing list