Not really an OpenLayers question but I think you need to use: clone.get("layer").setName("pmpm");
Best regards, Bart > > Hi all, I am just beginning adding layers to my map and experimenting with > CQL filters. > When calling the function Layer.setName, to change the name of a layer, > Firebug gives the error "clone.setName is not a function" (where clone is > the variable holding the layer). > Could anyone point me in the right direction please? > Many thanks, > Eoin > I am using OpenLayers 2.9.1 > The following is my code: > > var clone = record.clone(); > clone.get("layer").mergeNewParams({ > format: "image/png", > transparent: true, > cql_filter:'population<4000000' > }); > clone.setName("pmpm"); > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Layer-setName-error-tp5367399p5367399.html > Sent from the OpenLayers Users mailing list archive at Nabble.com. > _______________________________________________ > Users mailing list > Users@openlayers.org > http://openlayers.org/mailman/listinfo/users > -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS bart...@osgis.nl _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users