[OpenLayers-Users] Layer.setName() error

eoinyp eoinyp at yahoo.com
Tue Aug 3 04:33:17 EDT 2010


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.



More information about the Users mailing list