Live map example
Loading the Mapsource map…
Request / Response
Match a noisy GPS trace
Fit ordered device samples to the road network and return the matched line and confidence.
API call
curl --fail-with-body "https://api.mapsource.io/map-match" \
-H "Authorization: Bearer $MAPSOURCE_API_KEY" -H "Content-Type: application/json" \
--data '{"shape":[{"lat":47.6060,"lon":-122.3330},{"lat":47.6090,"lon":-122.3370},{"lat":47.6130,"lon":-122.3420}],"costing":"bicycle","shapeMatch":"map_snap"}'Example response
{"schema":"mapsource-map-match.v1","profile":"bicycle","confidence":0.94,"geometry":{"type":"LineString","coordinates":[[-122.3328,47.6061],[-122.3371,47.6091],[-122.3418,47.6131]]},"wayIds":[4215879,4215880],"matchedPoints":[{"matched":true},{"matched":true},{"matched":true}]}Repair a noisy trace
Map matching follows an ordered GPS shape through the routing network and returns matched geometry, point status, confidence and associated OSM ways.
Anchor isolated coordinates
Snapping finds the nearest network position for each input point and reports street, way, side and offset information where available.
Service details
Built around a published contract
Inputs, outputs and limits remain inspectable in the generated API reference.
- Trace endpoint
- POST /api/map-match
- Point endpoint
- POST /api/snap
- Trace size
- 2–1,000 coordinates
- Output
- Matched geometry and road context