setStyle abstract method

bool setStyle({
  1. required int id,
  2. required String style,
})

Applies JSON style transformation to the layer. Replaces previous styling with the specified ID (if such exists). Stylings are applied in an ascending order. Set to empty string to clear previous styling with the specified ID. Returns true if the style was successfully parsed and false otherwise. If the returned value is false, the current style remains unchanged.

Implementation

core.bool setStyle({
  required core.int id,
  required core.String style,
});