Thanks. Good to know . Now I'm trying it like this: var legendLayerStore = new GeoExt.data.LayerStore({ map: map, layers: [publiclands,watersheds,quads,counties,overlay1] });
// set legendurls var watershedsrec = legendLayerStore.getByLayer(watersheds); watershedsrec.set("legendURL", "http://myurl/legend/watersheds_legend.png"); That give me an error "getByLayer(...) is not a function... Karsten > -----Original Message----- > From: Bart van den Eijnden (OSGIS) [mailto:bart...@osgis.nl] > Sent: Wednesday, November 24, 2010 00:34 > To: karsten vennemann > Cc: bart...@osgis.nl; users@geoext.org > Subject: RE: [Users] problem using 'legendURL' > > Hmm, strangely enough it is not in the API docs [1], however in > GeoExt/data/LayerStore.js: > > /** public: method[getByLayer] > * :param layer: ``OpenLayers.Layer`` > * :return: :class:`GeoExt.data.LayerRecord` or > undefined if not found > * > * Get the record for the specified layer > */ > getByLayer: function(layer) { > var index = this.findBy(function(r) { > return r.get("layer") === layer; > }); > if(index > -1) { > return this.getAt(index); > } > }, > > [1] http://api.geoext.org/1.0/docs/lib/GeoExt/data/LayerStore.html > > Best regards, > Bart _______________________________________________ Users mailing list Users@geoext.org http://www.geoext.org/cgi-bin/mailman/listinfo/users