toUrlString method

  1. @override
String toUrlString()
override

Implementation

@override
String toUrlString() {
  if (locations.isEmpty) {
    throw StateError(
      'Marker must contain at least one location. '
      'Empty array was provided to "locations" argument.',
    );
  }

  String string = "";

  if (anchor != null) string += "anchor:${anchor!.value}$_separator";

  string += "icon:$icon$_separator";

  if (locations.isNotEmpty) string += _markerLocationsString;

  return string;
}