Welcome to mirror list, hosted at ThFree Co, Russian Federation.

map_style.cpp « indexer - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 206429b9dcd53545c0bd1b53913a883f62571b77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include "indexer/map_style.hpp"

#include "base/assert.hpp"

MapStyle const kDefaultMapStyle = MapStyleClear;

MapStyle MapStyleFromSettings(std::string const & str)
{
  // MapStyleMerged is service style. It's unavailable for users.
  if (str == "MapStyleClear")
    return MapStyleClear;
  else if (str == "MapStyleDark")
    return MapStyleDark;
  else if (str == "MapStyleVehicleClear")
    return MapStyleVehicleClear;
  else if (str == "MapStyleVehicleDark")
    return MapStyleVehicleDark;

  return kDefaultMapStyle;
}

std::string MapStyleToString(MapStyle mapStyle)
{
  switch (mapStyle)
  {
  case MapStyleDark:
    return "MapStyleDark";
  case MapStyleClear:
    return "MapStyleClear";
  case MapStyleMerged:
    return "MapStyleMerged";
  case MapStyleVehicleDark:
    return "MapStyleVehicleDark";
  case MapStyleVehicleClear:
    return "MapStyleVehicleClear";

  case MapStyleCount:
    break;
  }
  ASSERT(false, ());
  return std::string();
}

std::string DebugPrint(MapStyle mapStyle)
{
  return MapStyleToString(mapStyle);
}