toMap method

Map toMap()

Implementation

Map toMap() {
  final map = {
    "name": sourceName,
    "urls": urlsServers.map((e) => e.toMapPlatform()).toList(),
    "tileSize": tileSize,
    "tileExtension": tileExtension,
    "maxZoomLevel": maxZoomLevel,
    "minZoomLevel": minZoomLevel,
  };
  if (keyApi != null) {
    map.putIfAbsent("api", () => {keyApi!.key: keyApi!.value});
  }
  return map;
}