{
  "version": 8,
  "name": "OsmAnd Style",
  "sprite": "/sprites/sprite",
  "glyphs": "https://fonts.openmaptiles.org/{fontstack}/{range}.pbf",
  "sources": {
    "osm": {
      "type": "vector",
      "tiles": ["https://test.osmand.net/vector/{z}/{x}/{y}.mvt"],
      "minzoom": 0,
      "maxzoom": 20
    }
  },
  "layers": [
    {
      "id": "background",
      "type": "background",
      "paint": { "background-color": "#f0e8d8" }
    },

    { "id": "landuse-residential", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "landuse", "residential"]], "paint": { "fill-color": "#e0d8d0" } },
    { "id": "landuse-commercial", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["in", "landuse", "commercial", "retail"]], "paint": { "fill-color": "#f0d8c8" } },
    { "id": "landuse-industrial", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "landuse", "industrial"]], "paint": { "fill-color": "#d8d0c8" } },
    { "id": "landuse-forest", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "landuse", "forest"]], "paint": { "fill-color": "#a0d090" } },
    { "id": "landuse-meadow", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["in", "landuse", "meadow", "grass", "pasture"]], "paint": { "fill-color": "#c8e0b0" } },
    { "id": "landuse-farmland", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "landuse", "farmland"]], "paint": { "fill-color": "#e8e4b0" } },

    { "id": "natural-wood", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["in", "natural", "wood", "forest"]], "paint": { "fill-color": "#8cc96e" } },
    { "id": "natural-water", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "natural", "water"]], "paint": { "fill-color": "#80c0ff" } },
    { "id": "natural-scrub", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "natural", "scrub"]], "paint": { "fill-color": "#b0d090" } },
    { "id": "natural-wetland", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "natural", "wetland"]], "paint": { "fill-color": "#a0d0c0" } },
    { "id": "natural-grassland", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "natural", "grassland"]], "paint": { "fill-color": "#c8e0b0" } },
    { "id": "natural-bare_rock", "type": "fill", "source": "osm", "source-layer": "ground_layer",
      "filter": ["all", ["==", "natural", "bare_rock"]], "paint": { "fill-color": "#d8d0c8" } },

    {
      "id": "buildings",
      "type": "fill",
      "source": "osm",
      "source-layer": "ground_layer",
      "filter": ["all", ["has", "building"]],
      "paint": { "fill-color": "#c8c8c8", "fill-outline-color": "#b0b0b0" }
    },

    { "id": "highway-motorway", "type": "line", "source": "osm", "source-layer": "ground_layer", "minzoom": 6,
      "filter": ["all", ["==", "highway", "motorway"]], "paint": { "line-color": "#e66", "line-width": 5 } },
    { "id": "highway-trunk-primary", "type": "line", "source": "osm", "source-layer": "ground_layer", "minzoom": 7,
      "filter": ["all", ["in", "highway", "trunk", "primary"]], "paint": { "line-color": "#fc8", "line-width": 4 } },
    { "id": "highway-secondary-tertiary", "type": "line", "source": "osm", "source-layer": "ground_layer", "minzoom": 9,
      "filter": ["all", ["in", "highway", "secondary", "tertiary"]], "paint": { "line-color": "#ffdd99", "line-width": 3.5 } },
    { "id": "highway-residential", "type": "line", "source": "osm", "source-layer": "ground_layer", "minzoom": 12,
      "filter": ["all", ["in", "highway", "residential", "unclassified", "living_street"]], "paint": { "line-color": "#ffffff", "line-width": 2.5 } },
    { "id": "highway-path", "type": "line", "source": "osm", "source-layer": "ground_layer", "minzoom": 14,
      "filter": ["all", ["in", "highway", "path", "footway", "cycleway", "track"]], "paint": { "line-color": "#886", "line-width": 1.5, "line-dasharray": [2, 2] } },

    { "id": "bridge", "type": "line", "source": "osm", "source-layer": "bridge_layer", "minzoom": 10,
      "paint": { "line-color": "#e66", "line-width": 5, "line-opacity": 0.9 } },
    { "id": "tunnel", "type": "line", "source": "osm", "source-layer": "tunnel_layer", "minzoom": 10,
      "paint": { "line-color": "#888", "line-width": 3, "line-dasharray": [3, 2] } },

    {
      "id": "shops",
      "type": "symbol",
      "source": "osm",
      "source-layer": "ground_layer",
      "minzoom": 15,
      "filter": ["all", ["has", "shop"]],
      "layout": {
        "icon-image": "{shop}",
        "icon-size": 0.9,
        "icon-allow-overlap": false,
        "text-field": "{name}",
        "text-font": ["Noto Sans Regular"],
        "text-size": 11,
        "text-anchor": "top",
        "text-offset": [0, 1],
        "text-optional": true,
        "text-max-width": 8
      },
      "paint": {
        "text-color": "#333",
        "text-halo-color": "#fff",
        "text-halo-width": 1.5
      }
    },

    {
      "id": "place-labels",
      "type": "symbol",
      "source": "osm",
      "source-layer": "ground_layer",
      "minzoom": 10,
      "filter": ["all", ["has", "name"], ["==", "$type", "Point"]],
      "layout": {
        "text-field": "{name}",
        "text-font": ["Noto Sans Regular"],
        "text-size": 13,
        "text-max-width": 8
      },
      "paint": { "text-color": "#333", "text-halo-color": "#fff", "text-halo-width": 2 }
    },
    {
      "id": "road-labels-motorway",
      "type": "symbol",
      "source": "osm",
      "source-layer": "ground_layer",
      "minzoom": 8,
      "filter": ["all", ["has", "name"], ["==", "highway", "motorway"]],
      "layout": { "text-field": "{name}", "text-font": ["Noto Sans Regular"], "text-size": 12, "symbol-placement": "line" },
      "paint": { "text-color": "#222", "text-halo-color": "#fff", "text-halo-width": 2 }
    },
    {
      "id": "road-labels-major",
      "type": "symbol",
      "source": "osm",
      "source-layer": "ground_layer",
      "minzoom": 12,
      "filter": ["all", ["has", "name"], ["in", "highway", "trunk", "primary", "secondary", "tertiary"]],
      "layout": { "text-field": "{name}", "text-font": ["Noto Sans Regular"], "text-size": 11, "symbol-placement": "line" },
      "paint": { "text-color": "#222", "text-halo-color": "#fff", "text-halo-width": 2 }
    }
  ]
}