Alan Kinnaman
Aug 28, 2017 · 1 min read

Yeah, that’s what I’ve been doing. My map uses raster tiles that I rendered years ago using TileMill. I’m hosting these tiles as static files on a server, and pointing my app to a Mapbox style hosted on that server. The style looks like this (I’ve omitted the full URL here):

{
"version": 8,
"name": "Forest Maps",
"sources": {
"BaseMap": {
"type": "raster",
"tiles": [
"https://------/tiles/{z}/{x}/{y}.png"
],
"tileSize": 128
}
},
"layers": [
{
"id": "BaseMap",
"type": "raster",
"source": "BaseMap",
"minzoom": 3,
"layout": {
"visibility": "visible"
}
}
]
}

The same type of thing could be done with vector tiles, but you’d probably need to use a tool like TileServer GL:

I played around with this at one point, and got it working, but didn’t pursue it much further, since my map is just raster data.

An issue I ran into when setting up my own vector server was that none of the Mapbox vector data (Mapbox Streets, Vector Terrain, etc.) is available outside Mapbox studio. If you’re using only your own data and none of the tilesets provided by Mapbox, TileServer GL will probably work for you.

)
    Alan Kinnaman

    Written by

    Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
    Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
    Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade