Open Street Map Tile Server and API
A map is not a picture. It is a machine.
Behind it sits a small production line that turns one of the largest open datasets in the world into something a browser can draw in a fraction of a second.Understanding that line is worth a few minutes, because one decision inside it — raster tiles or vector tiles — shapes what your map can do, what it costs to run, and how it will look on the devices your customers actually use.
Design Map Depiction
Here you can see how the map is displayed with different styles. You can change the colors, fonts, and other visual elements to match your brand or design preferences. The map can be customized to show different types of information, such as roads, buildings, and points of interest.
How does an OSM map server work?
The raw material: OpenStreetMap
OpenStreetMap is a global geodatabase built and maintained by a community of millions of contributors. Every road, building footprint, address point, river and forest is stored as geometry plus a set of attributes — highway=residential, building=yes, maxspeed=30. The full planet file is roughly {80 GB} of compressed raw data, and it changes continuously: a new roundabout in your town can appear in the global dataset within minutes of being mapped.
The import: from raw data to a spatial database
Raw OSM data is not something you can query at map speed. It is imported into a spatial database — typically PostgreSQL with the PostGIS extension — where geometries are reprojected, indexed and organised so that a query like "give me every road of class primary inside this rectangle" answers in milliseconds instead of minutes. This import is the heavy part of running a map server: it takes hours of CPU time and a well-tuned database. Afterwards, minutely or daily change files keep the database current without a full reimport.
The grid: why maps are cut into tiles
Nobody renders a whole country on demand. Instead, the world is projected into Web Mercator and cut into a pyramid of square tiles. Zoom level 0 is a single tile showing the entire planet. Each further level splits every tile into four, so level 1 has 4 tiles, level 2 has 16, and by level 14 — roughly neighbourhood scale — there are over 268 million. Every tile has a simple address, z/x/y, which is why a map request looks like /tiles/14/8593/5471.png. This grid is the reason web maps feel instant. Your browser only ever asks for the handful of tiles that are currently on screen, and the server — or a cache in front of it — only ever has to deliver those.
The rendering: where raster and vector part ways
At this point the pipeline forks, and the rest of this text is about that fork.
Caching and delivery
Whichever path you take, finished tiles are cached — on disk, in a tile store, on a CDN edge — so that the second visitor asking for the centre of Berlin gets a file, not a computation. A well-run map server serves the overwhelming majority of its traffic from cache. That is what makes the difference between a map that feels native and one that feels like a website from 2008.
The client
Finally a JavaScript library in the browser — Leaflet and OpenLayers for raster, MapLibre GL JS for vector — arranges the tiles, handles panning and zooming, and puts your own data on top: branches, delivery areas, routes, sensors.f
What is the difference between raster and vector maps?
Strengths of Raster Tiles
Limitations of Raster Tiles
Strengths of Vector Tiles
Limitations of Vector Tiles