static ChamplainMapSource *
champlain_map_source_new_memphis (ChamplainMapSourceDesc *desc)
{
  ChamplainMapSource *map_source;
  ChamplainRenderer *renderer;
  gchar *id, *name, *license, *license_uri;
  guint min_zoom, max_zoom, tile_size;
  ChamplainMapProjection projection;

  g_object_get (G_OBJECT (desc),
      "id", &id,
      "name", &name,
      "license", &license,
      "license-uri", &license_uri,
      "min-zoom-level", &min_zoom,
      "max-zoom-level", &max_zoom,
      "tile-size", &tile_size,
      "projection", &projection,
      NULL);

  renderer = CHAMPLAIN_RENDERER (champlain_memphis_renderer_new_full (tile_size));

  if (g_strcmp0 (id, CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL) == 0)
    {
      map_source = CHAMPLAIN_MAP_SOURCE (champlain_file_tile_source_new_full (
                id,
                name,
                license,
                license_uri,
                min_zoom,
                max_zoom,
                tile_size,
                projection,
                renderer));
    }
  else
    {
      map_source = CHAMPLAIN_MAP_SOURCE (champlain_network_bbox_tile_source_new_full (
                id,
                name,
                license,
                license_uri,
                min_zoom,
                max_zoom,
                tile_size,
                projection,
                renderer));
    }

  return map_source;
}
static ChamplainMapSource *
champlain_map_source_new_memphis (ChamplainMapSourceDesc *desc)
{
  ChamplainMapSource *map_source;
  ChamplainRenderer *renderer;
  const gchar *id, *name, *license, *license_uri;
  guint min_zoom, max_zoom, tile_size;
  ChamplainMapProjection projection;

  id = champlain_map_source_desc_get_id (desc);
  name = champlain_map_source_desc_get_name (desc);
  license = champlain_map_source_desc_get_license (desc);
  license_uri = champlain_map_source_desc_get_license_uri (desc);
  min_zoom = champlain_map_source_desc_get_min_zoom_level (desc);
  max_zoom = champlain_map_source_desc_get_max_zoom_level (desc);
  tile_size = champlain_map_source_desc_get_tile_size (desc);
  projection = champlain_map_source_desc_get_projection (desc);

  renderer = CHAMPLAIN_RENDERER (champlain_memphis_renderer_new_full (tile_size));

  if (g_strcmp0 (id, CHAMPLAIN_MAP_SOURCE_MEMPHIS_LOCAL) == 0)
    {
      map_source = CHAMPLAIN_MAP_SOURCE (champlain_file_tile_source_new_full (
                id,
                name,
                license,
                license_uri,
                min_zoom,
                max_zoom,
                tile_size,
                projection,
                renderer));
    }
  else
    {
      map_source = CHAMPLAIN_MAP_SOURCE (champlain_network_bbox_tile_source_new_full (
                id,
                name,
                license,
                license_uri,
                min_zoom,
                max_zoom,
                tile_size,
                projection,
                renderer));
    }

  return map_source;
}