GetLayerStyle -- get the style of a layer (V4.0)
t = GetLayerStyle(id)
This function returns all style attributes of the specified layer. The different attributes are returned in a table which you can then examine. The contents of the style table returned by this function depend on the type of the layer that you specified. For a complete overview of all style elements that will be returned by this function, please have a look at the documentation of the SetLayerStyle() command which contains a list of the layer style elements and to which layer types they apply.

Please note that this command always queries all attributes so it can sometimes get quite slow. If you need only some basic information about a layer, it could be faster to use GetAttribute() instead.

identifier of the layer to examine
a table containing all style attributes for this layer
t = GetLayerStyle(1)
Print("This layer is at position", t.x, ":", t.y, "!")
The code above queries the style of layer 1 and displays its position then.

Show TOC