Styles
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.
UUID of the dataset version to query. Each dataset can have multiple versions representing different states of the data over time
Earthscale API key used to authenticate requests and determine which datasets you have access to. API keys can be managed in the Earthscale Web App under the user menu (top-right) -> 'API Settings'
Style specification format. 'mapbox' returns a MapLibre/Mapbox GL style JSON with sources and layers configured for this dataset
mapboxRestrict to visualization settings from a specific Earthscale map. If omitted, returns the most recently used style for this dataset globally
Mapbox/MapLibre style JSON
If the dataset version is not in that map or has no defined visualization.
Validation Error
GET /v1/vector/{dataset_version_id}/style?api_key=text HTTP/1.1
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