| layout | examples | |
|---|---|---|
| title | Raster Tiles | |
| css |
|
|
| javascript |
|
This is the "classical" job of osm2pgsql: Import data into a database, then use Mapnik or another rendering engine to create raster tiles from the data.
The "standard" OSM map you see below and on openstreetmap.org{:.extlink} uses osm2pgsql, the Mapnik{:.extlink} renderer and the OpenStreetMap Carto{:.extlink} style. Some more information about it is on the OSM wiki{:.extlink}. Many other maps use a similar setup.
To learn more about how to set up a raster tile server see switch2osm{:.extlink}.
<script> var layer = new ol.layer.Tile({ source: new ol.source.OSM() });var map = new ol.Map({ layers: [layer], target: 'map', view: new ol.View({ maxZoom: 18, center: ol.proj.fromLonLat([121, 14]), zoom: 10, }), }); </script>