WAVHub Map API
← Back to the map · Base URL:
Everything is served from WAVHub's own server: map tiles, styles, fonts, search and routing. Map data © OpenStreetMap contributors (ODbL) — keep the attribution visible wherever the map is shown.
If the server has API keys turned on, add ?key=YOUR_KEY or an x-api-key header to /api/* calls. Tiles, styles and fonts never need a key.
Show the map in your app
Embed (no code)
<iframe src="/?embed=1#map=15/14.5547/121.0244" width="100%" height="420" style="border:0"></iframe>
MapLibre GL JS (web), MapLibre Native (Android / iOS), Flutter, React Native
new maplibregl.Map({
container: 'map',
style: '/styles/light.json', // light | dark | streets | satellite
center: [121.0244, 14.5547], zoom: 13
});
| URL | What |
|---|---|
/styles/{light|dark|streets|satellite}.json?lang=en&3d=1 | Map style. lang: en, tl, local. 3d=1 turns on 3D buildings. |
/tiles.json | TileJSON for the vector tiles (OpenMapTiles schema, zoom 0–14, overzoom beyond). |
/tiles/{z}/{x}/{y}.pbf | Vector tiles (works with Leaflet + maplibre-gl-leaflet, OpenLayers, QGIS). |
/data/ph.pmtiles | Whole Philippines as one PMTiles file (range requests) for offline / mobile use. |
/fonts/{fontstack}/{range}.pbf | Label fonts. |
Search & addresses
GET/api/search?q=sm megamall&lon=121.05&lat=14.58&limit=10
Search-as-you-type for places, streets, barangays, cities and POIs. Understands Filipino words (botika, palengke, simbahan, gasolinahan…). lon/lat are optional and make nearby results rank first.
GET/api/reverse?lon=121.0509&lat=14.5794
Coordinates → nearest address: house number, street, barangay, city, province, ZIP.
GET/api/nearby?category=hospital&lon=121.02&lat=14.55&radius=3000
Closest places of a category, sorted by distance. Categories: /api/categories (hospital, pharmacy, fuel, atm, food, grocery, police, school, hotel, church, transit, parking, ev) or any OSM value such as fire_station.
Routing
Modes: car, motorcycle, tricycle, bike, walk, truck, bus. These endpoints return 503 until the routing service is deployed.
GET/api/route?points=121.0244,14.5547;120.9842,14.5995&mode=car
Turn-by-turn directions with up to 2 alternatives. 2–25 points as lon,lat;lon,lat. Options: avoid_tolls=1, avoid_ferries=1, avoid_highways=1, language=en-US. Also accepts POST with JSON {"points": [[lon,lat],…], "mode": "car"}. Returns distance, duration, GeoJSON line and steps.
GET/api/isochrone?lon=121.02&lat=14.55&mode=car&minutes=10,20,30
GeoJSON polygons of the area reachable within N minutes (service areas, delivery zones).
POST/api/matrix
{ "sources": [[121.02,14.55]], "targets": [[120.98,14.60],[121.05,14.58]], "mode": "motorcycle" }
Travel time and distance between every source and target (nearest rider / branch).
POST/api/optimize
{ "points": [[lon,lat], [lon,lat], [lon,lat], …], "mode": "car" }
Best order to visit 3–50 stops (first and last stay fixed).
POST/api/snap
{ "points": [[lon,lat], …], "mode": "car" }
Snap a raw GPS trace to the road network (fleet tracking, trip distance).
Status
GET/api/status
Data dates, number of indexed places and whether routing is up.