# ui.Map.Layer.setName

<br />

Sets the name of the layer.

<br />

Returns this map layer.

| Usage | Returns |
|---|---|
| `Layer.setName(*name*)` | ui.Map.AbstractLayer |

| Argument | Type | Details |
|---|---|---|
| this: `ui.map.abstractlayer` | ui.Map.AbstractLayer | The ui.Map.AbstractLayer instance. |
| `name` | String, optional | The name of the layer. |