Provides functionality to assign a style to a layer in GeoServer.
Verifies that the specified style exists before attempting to assign it as
the default style for a given layer. All functions require a
GeoserverConfig.Connection as their first argument.
Summary
Functions
Assigns a style to a layer as its default style, verifying the style exists first.
Removes the default style assignment from a layer (resets to no default style).
Functions
Assigns a style to a layer as its default style, verifying the style exists first.
Pass nil or "" as style_name to remove the current default style
(same as calling unassign_style_from_layer/3).
Parameters
conn— aGeoserverConfig.Connectionworkspace— workspace in which the layer resideslayer_name— name of the layerstyle_name— name of the style to assign, ornil/""to unassignstyle_workspace— workspace of the style, ornilto check globally (default:nil)
Returns
{:ok, message}if the style was successfully assigned{:error, reason}if the style does not exist or the assignment failed
Removes the default style assignment from a layer (resets to no default style).
Equivalent to calling assign_style_to_layer(conn, ws, layer, nil).
Parameters
conn— aGeoserverConfig.Connectionworkspace— workspace in which the layer resideslayer_name— name of the layer
Returns
{:ok, message}if the style was successfully unassigned{:error, reason}on failure