Skip to content

Instantly share code, notes, and snippets.

@smellman
Last active August 30, 2022 19:22
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save smellman/d3cbc19d134d5283df73 to your computer and use it in GitHub Desktop.
Save smellman/d3cbc19d134d5283df73 to your computer and use it in GitHub Desktop.
Mapbox GL Style example using OpenStreetMap tile server
{
"version": 8,
"name": "Raster Tiles",
"glyphs": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/fonts/{fontstack}/{range}.pbf",
"sprite": "https://smellman.github.io/creating_tiles_with_global_map_support_files/2015/mapbox_vector_tile_demo/demosites/maki-sprites/sprite",
"sources": {
"osm": {
"type": "raster",
"tiles": [
"https://a.tile.openstreetmap.org/{z}/{x}/{y}.png",
"https://b.tile.openstreetmap.org/{z}/{x}/{y}.png",
"https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"
],
"tileSize": 256
}
},
"layers": [{
"id": "osm",
"type": "raster",
"source": "osm",
"paint": {
"raster-fade-duration": 100
}
}]
}
@Firefishy
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment