DocsWeb Maps

Web Maps

You want to add a map to your web app - let users search for an address, build a route and see it drawn on screen. PickPoint handles the hard parts: geocoding the typed address, calculating the optimal route, and returning the geometry ready to render. You choose the map library that fits your stack.

What both tutorials build

1
Address autocomplete

Debounced search input calling GET /v2/address/search with the visible map bounds as bbox. Results appear in a dropdown; selecting one drops a destination marker.

2
Routing

POST /v2/route with origin (your geolocation) and destination. The response includes trip.legs[0].shape - an array of [lat, lon] pairs ready to draw.

3
Route rendering

Leaflet: L.polyline(shape). MapLibre: flip coordinates to [lon, lat] for GeoJSON and call source.setData() - the layer updates without recreation.

4
Live tracking (optional)

Subscribe to PickPoint's WebSocket tracking API with your API key to receive location:added events and move a vehicle marker in real time.

Key difference to keep in mind: Leaflet uses [latitude, longitude] - PickPoint's shape array is directly usable. MapLibre uses [longitude, latitude] (GeoJSON order), so you flip each point before passing to setData(). PickPoint's geocoding endpoints always return named lat / lon string fields - no coordinate-order ambiguity there.

Geocoding guideRouting guideDevice TrackingNavigator App (mobile)