Introduction to Web Mapping
Learn the fundamentals of web mapping, its architecture and data services, and how to build interactive maps using client‑side libraries.
Summary
Read Summary
Flashcards
Save Flashcards
Quiz
Take Quiz
Quick Practice
What is the primary delivery method and interface for web mapping?
1 of 17
Summary
Introduction to Web Mapping
What Is Web Mapping?
Web mapping is the delivery of interactive geographic information over the internet through a web browser or mobile application. Unlike traditional paper maps, web maps are dynamic and responsive to user actions. When you use a mapping application on your phone or computer, you are interacting with a web map.
The key feature that distinguishes web maps from static cartography is interactivity. A web map allows users to:
Pan (move the view left, right, up, or down)
Zoom in and out to see different levels of detail
Click on features to reveal information
Toggle data layers on and off
Upload and overlay their own custom data
Consider the difference between a printed road atlas and Google Maps. The atlas shows a fixed view of roads and cities that cannot change. Google Maps, by contrast, lets you zoom to a specific address, search for nearby restaurants, view real-time traffic conditions, and get turn-by-turn navigation. This dynamic, real-time capability is the essence of web mapping.
How Web Maps Work: The Architecture
Web maps operate on a client-server architecture. The server is a computer that stores and manages geographic data. The client is your web browser or mobile app that displays the map and responds to your interactions. When you pan or zoom, your client requests updated map data from the server, which sends back the appropriate content.
Every web map consists of three fundamental layers working together:
1. Data Services Layer: Geographic data such as roads, building footprints, administrative boundaries, and satellite imagery are stored on a server in structured formats. When the client needs map information, it requests it from these data services.
2. Rendering Engine: This layer converts raw geographic data into visual map images or vector graphics that can be displayed on your screen. There are two main approaches:
Tile-based rendering: Pre-generated small square images (typically 256 × 256 pixels called "map tiles") are assembled to form the complete map view.
Vector rendering: Raw vector features (points, lines, and polygons) are sent to the client, which renders them dynamically using styling rules.
3. Client Application: JavaScript code running in your web browser handles user interactions (mouse clicks, zoom gestures) and displays the map on an HTML canvas element.
Geographic Data Formats
To understand web mapping, you need to know how geographic data is stored and transmitted. There are two primary categories:
Vector Data represents geographic features as discrete geometric objects—points for locations, lines for roads or rivers, and polygons for land parcels or administrative boundaries. The most common vector formats for web mapping are:
Shapefile: A traditional format that stores vector geometry and attribute data across multiple related files. Shapefiles are widely used in GIS but must be converted to web-friendly formats for mapping applications.
GeoJSON: A lightweight, human-readable format that encodes vector features and their properties in JSON syntax. GeoJSON is ideal for web mapping because it can be easily transmitted over the internet and parsed by JavaScript.
Raster Data represents geographic information as a grid of colored pixels or cells. Satellite imagery, aerial photography, and elevation data are commonly raster formats. For web mapping, raster data is typically divided into raster tiles—small image files (usually 256 × 256 pixels) that are delivered as PNG or JPEG files. Each tile corresponds to a specific geographic area at a specific zoom level.
Web GIS Protocols and Services
Several standardized protocols define how clients request map data from servers. Understanding these is essential because they are the "language" of web mapping:
Web Map Service (WMS) is a standard that delivers map images on demand. When your client needs to display an area, it sends a WMS request specifying the geographic bounds and desired image size. The server renders that area and returns a complete map image. WMS is simple but inflexible—if you need to zoom in slightly, the server must render an entirely new image.
Web Map Tile Service (WMTS) solves this problem by providing pre-rendered map tiles at multiple fixed zoom levels. Since tiles are pre-generated and cached on the server, they can be delivered very quickly. When you zoom or pan, your client simply requests the appropriate pre-made tiles rather than asking the server to render new images on the fly.
ArcGIS REST API is a flexible protocol developed by Esri that provides programmatic access to map layers, feature services, and tile services using RESTful (Representational State Transfer) endpoints. Instead of requesting images or tiles, you request specific geographic data or map services using standard HTTP requests.
Vector Tiles and Dynamic Styling
Vector tiles extend the concept of pre-rendering by encoding actual vector features (not images) into compressed tile format. The most common standard is the Mapbox Vector Tile format, which uses protobuf compression to keep file sizes small.
The advantage of vector tiles is dynamic styling: because the client receives raw vector features rather than pre-rendered images, it can apply styling rules on the fly. A single set of vector tiles can be styled to look like a street map, a terrain map, or a custom design—all without requesting new data from the server. This enables smooth, responsive interactions and real-time symbol changes as users zoom or interact with the map.
Client-Side Technologies
The client—your web browser—runs JavaScript mapping libraries that handle most of the visual work. Popular open-source libraries include:
Leaflet: A lightweight, easy-to-learn library ideal for simple to moderately complex maps.
OpenLayers: A more feature-rich library used for complex GIS applications.
Commercial APIs like Google Maps and Mapbox provide their own JavaScript libraries along with hosted map data.
Using these libraries, developers can:
Request map tiles or vector data from servers
Overlay additional data layers (traffic, weather, custom datasets)
Perform simple spatial queries (e.g., "which features are within this area?")
Display pop-ups with information about clicked features
Generate and update legends that explain map symbology
Practical Applications of Web Mapping
Web mapping is transforming how we interact with geographic information across many fields:
Navigation: Smartphone navigation apps use web maps with real-time traffic data and turn-by-turn directions. Your client requests your current location and the destination, and the server provides optimized routes.
Urban Planning: City planners publish web maps of zoning regulations, infrastructure projects, and development proposals. Citizens can explore these maps online and provide feedback without needing GIS software.
Disaster Response: Emergency managers use web maps to visualize hazard extents (flood zones, fire perimeters), evacuation routes, and shelter locations. Real-time data feeds update these maps as situations evolve.
Data Journalism: Journalists embed interactive maps in online articles to help readers explore complex spatial data directly in their browser. For example, an investigation into housing patterns might include a map where readers can click neighborhoods to see demographic data.
Accessibility: Web mapping democratizes geographic data. Anyone with an internet browser can explore detailed geographic information without purchasing expensive GIS software.
Getting Started: The Web Mapping Workflow
If you want to create a web map, follow this general process:
Step 1: Prepare Your Data
Start with geographic data in a desktop GIS application like QGIS (an open-source tool). Edit the data, add attributes, and apply styling rules to define how features should appear on the map. Then export the data to a web-friendly format: typically GeoJSON for vector data or raster tiles for imagery.
Step 2: Set Up a Data Service
Choose how your data will be served to clients. For vector data, use a vector tile server (such as Mapbox) to stream data efficiently. For raster data, use a tile server to serve pre-generated raster tiles. Alternatively, use a commercial platform like Google Maps or Mapbox, which provide ready-made APIs and hosted data.
Step 3: Build the Client Application
Write HTML and JavaScript code that:
Loads a mapping library (Leaflet, OpenLayers, or a commercial API)
Requests map tiles or vector data from your data service
Adds interaction handlers so users can pan, zoom, click, and explore
Step 4: Deploy and Share
Host your web map on a server and share the URL with users. Anyone with a browser can access it.
<extrainfo>
Commercial vs. Open-Source Approaches
Commercial platforms like Google Maps and Mapbox are excellent for rapid development. They provide:
Pre-made base map tiles and imagery
Hosting and infrastructure
JavaScript SDKs for web and mobile
Ready-to-use features like geocoding (address lookup) and routing
Open-source tools like QGIS, Leaflet, and OpenLayers offer more flexibility and control but require more technical effort to set up and maintain.
</extrainfo>
Core Concepts to Master
Before building a web map, ensure you understand:
Coordinate systems: Methods for specifying locations using numbers (latitude and longitude, or x and y coordinates)
Map projections: Techniques for representing the curved Earth on a flat map while minimizing distortion
Map layers: Separate, stackable datasets (roads layer, building layer, vegetation layer, etc.) that combine to form a complete map
These foundational concepts allow you to work with geographic data correctly and ensure that different datasets align properly when overlaid on a web map.
Flashcards
What is the primary delivery method and interface for web mapping?
Interactive maps delivered over the internet via a web browser or mobile application.
How does web mapping differ from traditional cartography in terms of user interaction?
Web mapping adds dynamic interaction and real-time data updates, whereas traditional cartography produces static paper maps that cannot be altered.
What specific architecture is web mapping built upon?
Client-server architecture.
What are the three fundamental layers of a web map?
Data services
Rendering engine
Client-side application
What does the Web Map Service (WMS) protocol deliver to a client?
Map images.
How does the Web Map Tile Service (WMTS) provide map data?
It provides pre-generated map tiles at multiple zoom levels.
What are the typical dimensions of the small square images produced by a tile rendering engine?
$256 \times 256$ pixels.
How does a vector rendering engine deliver data to the client compared to a raster engine?
It streams raw vector features instead of pre-generated images.
What is the primary benefit of a client-side vector rendering engine?
The client can style vector data dynamically, allowing for smoother interactions and real-time symbol changes.
What specific HTML element is typically used by a client-side application to display map content?
The HTML <canvas> element.
What type of data does a Shapefile store?
Vector geometry and attribute data.
What format is used by GeoJSON to store vector features and properties?
Lightweight JSON format.
What are the two most common image formats for raster tiles?
PNG or JPEG.
What compression method is used by the Mapbox Vector Tile format?
Protobuf compression.
What type of spatial queries can client-side libraries typically perform?
They can determine which features intersect a clicked point or a drawn shape.
Which open-source desktop GIS is commonly used to prepare, style, and export data for web maps?
QGIS.
What does the Mapbox platform offer for web and mobile mapping applications?
Hosted vector tiles, styling tools, and SDKs.
Quiz
Introduction to Web Mapping Quiz Question 1: Which file format stores vector geometry together with attribute data in a set of related files?
- Shapefile (correct)
- GeoJSON
- KML
- Raster PNG tiles
Introduction to Web Mapping Quiz Question 2: What everyday application relies on web maps to give users real‑time routing directions?
- Smartphone navigation apps (correct)
- Online weather forecasting sites
- Digital photo‑sharing platforms
- E‑commerce shopping websites
Introduction to Web Mapping Quiz Question 3: When first learning web mapping, which fundamental concepts should be understood?
- Coordinate systems, map projections, and map layers (correct)
- Database indexing, server load balancing, and network protocols
- Graphic design, UI/UX, and typography
- Video encoding, streaming protocols, and CDN usage
Introduction to Web Mapping Quiz Question 4: Which open‑source desktop GIS is frequently used to edit, style, and export data for web mapping projects?
- QGIS (correct)
- AutoCAD
- ArcGIS Pro
- Tableau
Introduction to Web Mapping Quiz Question 5: What does a Web Map Service (WMS) return to a client request?
- Rendered map images (e.g., PNG, JPEG) (correct)
- Raw vector geometry files
- Geographic attribute tables in CSV format
- Tile metadata in JSON format
Introduction to Web Mapping Quiz Question 6: In which file formats are raster map tiles most commonly delivered?
- PNG or JPEG images (correct)
- Shapefile or GeoJSON files
- NetCDF or HDF5 datasets
- PDF or SVG vectors
Introduction to Web Mapping Quiz Question 7: What is the primary purpose of a map legend in web mapping applications?
- Explain the symbology used on the map (correct)
- Provide navigation controls for panning and zooming
- Store user authentication credentials
- Generate 3‑D terrain models
Introduction to Web Mapping Quiz Question 8: How do urban planners typically use web maps in project development?
- To share proposals and gather public feedback online (correct)
- To print high‑resolution paper maps for distribution
- To perform offline GIS analysis with desktop software
- To replace all field surveys entirely
Which file format stores vector geometry together with attribute data in a set of related files?
1 of 8
Key Concepts
Web Mapping Technologies
Web mapping
Web Map Service (WMS)
Web Map Tile Service (WMTS)
Vector tiles
GeoJSON
Shapefile
Mapping Libraries and APIs
Leaflet
OpenLayers
ArcGIS REST API
Tile Management
Tile rendering engine
Definitions
Web mapping
Interactive maps delivered over the internet that allow users to pan, zoom, query features, and overlay custom data.
Web Map Service (WMS)
An OGC standard that provides map images generated on demand in response to client requests.
Web Map Tile Service (WMTS)
An OGC standard that serves pre‑generated raster map tiles at multiple zoom levels for fast web display.
Vector tiles
Compact, binary-encoded packets of geographic vector features that are streamed to clients for dynamic styling.
GeoJSON
A lightweight JSON format for encoding geographic features and their properties.
Shapefile
A proprietary Esri file format that stores vector geometry and attribute data across several related files.
Leaflet
An open‑source JavaScript library for building interactive web maps using raster or vector tiles.
OpenLayers
A powerful open‑source JavaScript library that supports a wide range of web GIS functionalities and data sources.
ArcGIS REST API
A RESTful web service framework that provides access to ArcGIS map layers, feature services, and tile services.
Tile rendering engine
Server‑side software that pre‑generates small square map images (tiles) for efficient delivery to web clients.