toOptionsJSON method

  1. @override
void toOptionsJSON(
  1. StringBuffer buffer
)
override

Implementation

@override
void toOptionsJSON(StringBuffer buffer) {
  super.toOptionsJSON(buffer);

  if (enabled != null) {
    buffer.writeAll(['"enabled":', enabled, ','], '');
  }
  if (href != null) {
    buffer.writeAll(['"href":', jsonEncode(href), ','], '');
  }
  if (mapText != null) {
    buffer.writeAll(['"mapText":', jsonEncode(mapText), ','], '');
  }
  if (mapTextFull != null) {
    buffer.writeAll(['"mapTextFull":', jsonEncode(mapTextFull), ','], '');
  }
  if (position != null) {
    buffer.writeAll(['"position":', position?.toJSON(), ','], '');
  }
  if (style != null) {
    buffer.writeAll(['"style":', style?.toJSON(), ','], '');
  }
  if (text != null) {
    buffer.writeAll(['"text":', jsonEncode(text), ','], '');
  }
}