toMap method

dynamic toMap()

Implementation

toMap() {
  Map<String, Object> result = {};
  if (zoom != null) {
    result["zoom"] = zoom!;
  }
  if (bearing != null) {
    result["bearing"] = bearing!.degrees;
  }
  if (pitch != null) {
    result["pitch"] = pitch!.degrees;
  }
  if (transitionDuration != null) {
    result["transitionDuration"] = transitionDuration!;
  }
  if (center?.latitude != null && center?.longitude != null) {
    result["center"] = {
      "lat": center!.latitude,
      "lng": center!.longitude,
    };
  }

  return result;
}