As of a few weeks ago, it is now possible to add Mapbox Vector Tile (MVT) layers to JOSM. I have been playing around with these to learn how to apply basic styling to the layer. For this tutorial we will use a postcodes layer in Great Britain.
Styling requires us to first create a style.json file. Copy the contents below in to a plain text file (notepad) and save as style.json. If doing this on Windows you will want to make sure it doesn’t also have a .txt extension.
{
"version": 8,
"name": "Postcodes",
"owner": "Postcodes",
"id": "postcodes",
"sources": {
"postcodes-source": {
"maxzoom": 13,
"tiles": [
"https://api.mapbox.com/v4/robjn.3uur23nz/{zoom}/{x}/{y}.mvt?access_token=pk.eyJ1Ijoicm9iam4iLCJhIjoid0dYNkY1QSJ9.A-0lzQOawGYICYPfURsjDA"
],
"type": "vector"
}
},
"layers": [
{
"id": "something",
"type": "circle",
"source": "postcodes-source",
"source-layer": "results-4326-deduped",
"minzoom": 13,
"paint": {
"circle-color": "#C70039",
"circle-radius": 6
}
},
{
"id": "secondthing",
"type": "symbol",
"source": "postcodes-source",
"source-layer": "results-4326-deduped",
"minzoom": 13,
"layout": {
"text-field": "{postcode}",
"text-size": 18,
"text-allow-overlap": true,
"text-ignore-placement": true
},
"paint": {
"text-color": "#C70039",
"text-halo-color": "#000000"
}
}
]
}


