code: function(newName) {
          if (newName != this.name) {
              this.name = newName;
              if (this.map != null) {
                  this.map.events.triggerEvent("changelayer", {
                      layer: this,
                      property: "name"
                  });
              }
          }
      }
docs: APIMethod: setName
  Sets the new layer name for this layer.  Can trigger a changelayer event
  on the map.
  
  Parameters:
  newName - {String} The new name.