Hi,
I’m working on a project that requires self-hosting vector tiles derived from OSM data, and I’m looking for up-to-date information on the current state of vector tiles in 2024.
My Project Requirements:
- I want to self-host vector tiles
- Tiles should be pre-generated (similar to PBF downloads from Geofabrik)
- Must be suitable for commercial use
- Preferably covering specific countries or regions
- Planning to use MapLibre for rendering
- Want to support the following tile endpoint style:
/tiles/{z}/{x}/{y}.pbf
My Current Setup:
I’m currently using MapLibre with the following configuration:
const map = new maplibregl.Map({
container: 'map',
style: {
version: 8,
sources: {
osm: {
type: 'vector',
tiles: ['https://tiles.stadiamaps.com/data/openmaptiles/{z}/{x}/{y}.pbf'],
// ^^^^^^^^^^^^^^^^
}
},
// ... rest of configuration
}
});
My goal is to replace the tiles
URL with a self-hosted solution that follows the same /{z}/{x}/{y}.pbf
pattern.
Questions:
- Are there any current sources for downloading pre-generated vector tiles that can be self-hosted and used commercially, compatible with the MapLibre setup described above?
- What are the most up-to-date tools or pipelines for generating vector tiles from OSM data in 2024 that would work with this configuration?
- Are there any recent developments or projects in the OSM ecosystem related to vector tiles that I should be aware of, particularly those compatible with MapLibre?
- What are the current best practices for serving vector tiles, especially when self-hosting with the
/{z}/{x}/{y}.pbf
endpoint style? - Are there any challenges or considerations I should be aware of when working with vector tiles in 2024, specifically in the context of using MapLibre and self-hosting?
OpenMapTiles and Geofabrik’s VectorTiles are services which I prefer not to consume and won’t work for commercial usage. Generating my own tiles seems too difficult for low zoom levels that cover large areas of the world.
Any insights, recommendations, or pointers to recent discussions on this topic would be greatly appreciated. Thank you in advance for your help!