N-Ways
Developer docsSamples

Samples

Whole, working examples you can copy into your app and change.

On this page

Each sample is a whole program for a real job in a delivery or ride app, using the N-Ways APIs the way we recommend: keys restricted, errors handled, the map credit shown. Copy one, put in your key, and change it to fit your app.

What they use

SampleRunsAPIs
Delivery tracking pageA web page and a small serverFleet tracking, Maps SDK
Rider pickupA web page (works in a phone’s browser or a web view)Autocomplete, Geocoding, Routes with fares, Maps SDK
Dispatch matrixNode.js or Python, on your serverRoute matrix

Before you start

  • Keys. Web pages need a key restricted to your website; servers need another, restricted to their IP addresses. API keys
  • Points. The APIs take points as { "lat": …, "lng": … } and answer with GeoJSON, where coordinates are [longitude, latitude], the order maps use.
  • Credit. Wherever N-Ways data shows, show “N-Ways · © OpenStreetMap contributors”. The Maps SDK does it on maps. Attribution