Skip to contents


Get one or more Felt layer styles or update a specified layer style. Warning, updating a layer style without a list that can be converted to a valid Felt Style Language (FSL) may get a layer into an irreversible broken state.


get_felt_style(map_id, layer_id = NULL, call = caller_env())

update_felt_style(map_id, style, layer_id = NULL, call = caller_env())



A Felt map URL, map ID string, or a named list with a id and type element. If map_id is a list, it must be equivalent to the output from get_felt_map() where the list includes a "id" string and a "type" string with the value "map".


If NULL (default), all layers for the map are used. Multi-layer maps are not currently supported. Otherwise use a layer ID string. Use read_felt_layers() to list layers for an existing map.


The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.


A named list that can be converted to a valid Felt Style Language string. If style is supplied with a datasets id value matching the layer datasets ids, this function updates an existing layer style. If style is NULL (default), read styles for supplied map and layer. See the documentation on the Felt Style Language and the API endpoint for updating layer styles for more information.


If layer_id is NULL and the map contains multiple styles or if layer_id is a character vector, the function returns a list with style elements named with the layer ID values. If layer_id is a string, the function returns a named list with a single Felt Style Language specification.