Styles

Get vector dataset style

get

Returns a style definition corresponding to the latest visualization settings used in the Earthscale app for the dataset version.

If map_id is provided, only visualization settings from that specific map are returned. Returns 204 (No Content) if the dataset version is not in that map or has no visualization settings.

Path parameters
dataset_version_idstringRequired
Query parameters
api_keystringRequired
formatconst: mapboxOptional

Format of the style to return

Default: mapbox
map_idany ofOptional

Get the latest style of the dataset version within a specific map instead of globally

string · uuidOptional
or
nullOptional
Responses
200

Mapbox/MapLibre style JSON

application/json
Responseany
get
/vector/{dataset_version_id}/style
GET /v1/vector/{dataset_version_id}/style?api_key=text HTTP/1.1
Host: 
Accept: */*
{
  "version": 8,
  "sources": {
    "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-source": {
      "type": "vector",
      "tiles": [
        "http://tiles.gcp.earthscale.ai/us-central1/v1/vector/61e6c296-50fd-49c4-a2c2-3207a443c53c/tiles/{z}/{x}/{y}.mvt?api_key=0Oqc5Jh48PAEG4CTdB3nUv9fWKYwoxQ3"
      ],
      "maxzoom": 15
    }
  },
  "layers": [
    {
      "id": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-point",
      "type": "circle",
      "source": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-source",
      "source-layer": "default",
      "filter": [
        "==",
        [
          "geometry-type"
        ],
        "Point"
      ],
      "paint": {
        "circle-color": "#d0021b",
        "circle-opacity": 1,
        "circle-radius": 6
      }
    },
    {
      "id": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-line",
      "type": "line",
      "source": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-source",
      "source-layer": "default",
      "filter": [
        "any",
        [
          "==",
          [
            "geometry-type"
          ],
          "LineString"
        ],
        [
          "==",
          [
            "geometry-type"
          ],
          "MultiLineString"
        ]
      ],
      "paint": {
        "line-color": "#d0021b",
        "line-width": 6,
        "line-opacity": 1
      }
    },
    {
      "id": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-polygon-fill",
      "type": "fill",
      "source": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-source",
      "source-layer": "default",
      "filter": [
        "==",
        [
          "geometry-type"
        ],
        "Polygon"
      ],
      "paint": {
        "fill-color": "#1f1e21",
        "fill-opacity": 1
      }
    },
    {
      "id": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-polygon-stroke",
      "type": "line",
      "source": "earthscale-61e6c296-50fd-49c4-a2c2-3207a443c53c-source",
      "source-layer": "default",
      "filter": [
        "==",
        [
          "geometry-type"
        ],
        "Polygon"
      ],
      "paint": {
        "line-color": "#d0021b",
        "line-width": 1,
        "line-opacity": 1
      }
    }
  ]
}

Last updated