Guides
For the Overpass API, map tiles and elevation data: what errors and rate limits mean and how to fix them, how to point your tools at another server, and how the services compare. For ready-to-run queries, see the query examples.
Errors and limits
Stuck with errors or limits on a public Overpass server? Start here.
overpass-api.de: “429 Too Many Requests”
Why the public server rejects your queries, how its slots work, and how to stay within its limits.
Overpass API errors explained
429, 504, “runtime error: Query timed out”, “out of memory”, empty results: causes and fixes, with retry code.
Overpass API alternatives
Public instances, self-hosting and hosted plans compared, and when you need which.
Tools and libraries
Point your tools at another Overpass server, step by step. Tested with the current versions.
Overpass Turbo: use another Overpass server
Where the server setting is, the exact URL format, and what to check when Turbo shows an error.
QuickOSM (QGIS): change the Overpass server
Add a server in the QuickOSM settings, or in custom_config.json on older versions, and use it in Processing.
OSMnx: custom Overpass server and node elevations
Set overpass_url, avoid a 60-second pause before every query, and add node elevations without a Google key.
osmdata (R): use another Overpass server
set_overpass_url() in the R package osmdata, with the key kept out of your scripts.
Overpass API in Python
requests, overpy and overpass: query any Overpass server from Python, with retries and GeoJSON.
Elevation
Heights and depths for points, routes and GPX tracks, and how the elevation APIs compare.
A Google Elevation API alternative
The same request and response format, a fraction of the price, and results you may store and show on any map.
Open-Elevation and Open Topo Data: limits and alternatives
What the free public elevation APIs allow, what self-hosting takes, and how to switch.
Add elevation to a GPX file
Distance, ascent and descent of a track with one curl command, and a Python script that writes the heights into the file.
Maps for your website
Your shop on a map, a store locator, a delivery area, property listings: one page of code each, to copy and fill with your own places.
Add a map with your location to your website
A marker with your address, opening hours and a directions link, for the contact page. One block of HTML, no Google account.
A store locator map for your website
All your shops from a spreadsheet: a list beside the map, “near me” sorted by distance, and markers that group when you zoom out.
Show your delivery area on a map
Zones around your shop with their delivery fee, or an area you draw, and an answer for any place a customer clicks.
Property listings on a map
Price labels on the map, a card with a link for each flat or house, and filters for rent, buy and rooms.
Map tiles
Errors of map tile services and map libraries, what map tiles cost, and moving from Mapbox.
Map tile API errors explained
401, 403, 429, “Access blocked” on OpenStreetMap tiles, blank and grey maps: causes and fixes for MapLibre, Leaflet and Google Maps.
OpenStreetMap tiles: “Access blocked” and “Referer is required”
Why tile.openstreetmap.org blocks tiles, which settings remove the Referer (Helmet, Django, nginx), and the fix for Leaflet, OpenLayers and MapLibre.
MapLibre: “Unable to parse the tile” and “Unimplemented type: 3”
Gzip tiles without Content-Encoding, double compression and HTML pages: how to tell them apart, with nginx, Apache, Caddy and S3 fixes.
Google Maps: “This page can't load Google Maps correctly”
What RefererNotAllowedMapError, ApiNotActivatedMapError and BillingNotEnabledMapError mean, the fix for each, and what a map costs without Google.
Map tile API prices compared
Mapbox, MapTiler, Stadia Maps, OpenFreeMap and VersaTiles at 100,000, 2 million and 10 million tiles a month, with the sources.
From Mapbox GL JS to MapLibre GL JS
The code changes, what has no counterpart, plugins, styles and tiles, and the setWorkerUrl call that MapLibre 6 needs with a bundler.
Maps step by step
3D terrain, hillshading, contour lines, trails and sea depths in MapLibre, and vector maps in Leaflet, React and QGIS. Tested with the current versions.
3D terrain in MapLibre GL JS
Terrain from one style parameter or in code, exaggeration, sky and camera, heights under the mouse, and what 3D costs in tiles.
Hillshading in MapLibre GL JS
A hillshade layer under the roads, its colours for light and dark maps, and the five shading methods of MapLibre.
Contour lines in MapLibre GL JS
Contour lines as vector tiles: line and label layers, major and minor lines, labels in feet, and computing them in the browser instead.
A hiking map in MapLibre GL JS
Trails coloured by SAC grade, a popup with the trail name, huts and stops, 3D terrain, and your own route on top.
A nautical map with depths and sea marks
The sea coloured by depth, depth contours, buoys and lights in their colours, in one style or added to your own.
Vector map tiles in Leaflet
Vector maps in Leaflet through maplibre-gl-leaflet: script tags, a bundler with MapLibre 6, markers on top, and what Leaflet cannot do.
react-map-gl with MapLibre
A map component with react-map-gl 8 and MapLibre 6: style, markers, popups, 3D terrain, the key in an environment variable, Next.js.
Vector tiles and terrain in QGIS
Add a vector tile layer with a style URL, which styles QGIS can draw, terrain heights as a raster, and contour lines.
Try it with your own key
One key for the full-planet Overpass API, map tiles and elevation. The free plan is enough to follow every guide.