toMap method

Map toMap()

Implementation

Map toMap() {
  Map args = {};

  /// disable/show markers in start,middle,end points
  args.putIfAbsent(
    "roadBorderWidth",
    () => Platform.isIOS ? "${roadBorderWidth}px" : roadBorderWidth,
  );

  args.putIfAbsent(
    "zoomIntoRegion",
    () => zoomInto,
  );
  args.addAll(roadColor.toMapPlatform("roadColor"));
  args.putIfAbsent(
    "roadWidth",
    () => Platform.isIOS ? "${roadWidth}px" : roadWidth.toDouble(),
  );
  args.putIfAbsent(
    "roadBorderColor",
    () => (roadBorderColor ?? (roadColor).dark()).toPlatform(),
  );

  return args;
}