Web mapping is serving maps online, quickly. To make a web map, you need map data (typically organized in a database), map tiles rendered from these data with custom styles, geographic features you wanna overlay, and a mapping library that present all these online.
Figure: Technique stack of web mapping.
Open source libraries:
Commercial mapping APIs:
Map tiles are just raster images on the Web, which makes up the base layer.
Google Maps invented the Web Mercator projection (
epsg:3857, WGS84 / Pseudo Mercator) and map tiles.
All other slippy maps followed Google's lead, with tiles at the base.
Vector map tiles are map data packaged in small files for tile regions, which are rendered at client side for high resolution display and custom styling. Vector tiles are enabled by GPU and WebGL.
OpenStreetMap is a major source of map data for many applications, with reasonably good road network topology.
At 2016-09-20, OSM database dump
planet.osm takes over 721.1GB in uncompressed XML, 52.8GB compressed in bz2, and 32.9GB in PBF.
Initializing a traditional RDBMS such as PostgreSQL/PostGIS with all OSM data can take several days and 300-400 gigabytes of storage.
Overpass API, formerly known as OSM Server Side Scripting, is a read-only API that serves up custom selected parts of the OSM map data. Overpass API acts as a database over the web; the client sends a query to the API and gets back the data set that corresponds to the query. Overpass Turbo is a GUI for testing and developing queries for the Overpass API, which can also used for simple analysis of OSM data.
MapBox takes data directly from OSM, in style.
Geographic features for web mapping are typically shared as GML and GeoJSON files.
Shapefiles can be converted to GeoJSON with OGRE, a web client of
Major Commercial Players in Web Mapping: