Moving from Google Maps Platform
The same model of projects, restricted keys and quotas, with maps, addresses and routes made for West Africa. What maps to what, and how to move one API at a time.
If your app already uses Google Maps Platform, most of what you know carries over: N-Ways uses the same model of projects, restricted keys, per-API quotas and error reasons. This guide maps each piece to its N-Ways counterpart and shows what changes in your code. You can move one API at a time.
N-Ways isn’t affiliated with Google. Google Maps Platform is named here only to help you move; its products are described in our own words. Check Google’s own documentation for how they work.
Why move
- Addresses people use here: NIPOST postcodes to the building, GhanaPost GPS codes, landmarks and nicknames.
- How people travel here: okada, keke and danfo routes that respect ban areas, boats, trains, border crossings, and fares in naira, cedis, F CFA, Liberian dollars, Guinean francs, leones and Cape Verdean escudos.
- A lower bill: a free allowance for every API each month, and prices a fraction of the global platforms’, invoiced in local money.
- Open map technology: maps are MapLibre and vector tiles, so you can restyle them and show N-Ways data on any map, with the credit.
Concepts
| Google Maps Platform | N-Ways | What’s different |
|---|---|---|
| Cloud project with billing | Project | One project per app or customer; no separate billing account. Prepaid credit or an invoice. |
| Enabling each API | The project’s plan | No step to enable: a project may call the APIs in its plan, and each key can be narrowed further. |
| API key | API key (nw_…) | Sent as key= or the X-NWays-Api-Key header. |
| Application restrictions | Application restrictions | The same four kinds: websites (with wildcards), Android package and SHA-1, iOS bundle ID, IP addresses. One kind per key. |
| API restrictions | API restrictions | Tick the APIs a key may call. |
| Quotas and caps | Rate limits and daily caps | Per key and API, and optionally for the whole project. Quotas and limits |
| Field masks | fields= | Choose the fields you need; for Places and Routes it also sets the price tier. |
| Monthly free usage | Free calls for each API | Counted per API, not a shared credit. |
| Session tokens for autocomplete | Session tokens | Same idea: one token per search, ended by the pick. |
APIs
| If you use | Use on N-Ways | Status |
|---|---|---|
| Maps JavaScript API | Maps SDK for the web (@nways/maps, on MapLibre GL JS) | Available |
| Maps SDK for Android / iOS | N-Ways Maps for Android and for iOS (on MapLibre Native) | Available |
| Map Tiles API | Tiles API (vector tiles, PMTiles) | Available |
| Maps Static API | Static maps | See its page |
| Geocoding API | Geocoding and reverse geocoding | Available |
| Places API: nearby, text search, details | Places | Available |
| Places Autocomplete | Autocomplete | See its page |
| Address Validation API | Address validation | See its page |
| Routes API: compute routes | Routes | Available |
| Routes API: route matrix | Route matrix | See its page |
| Route Optimization API | Route optimisation | See its page |
| Fleet and last-mile delivery solutions | Fleet tracking and webhooks | See its page |
| Traffic layer | Traffic (GeoJSON) and the traffic feed | Available |
| Street View, Elevation, Roads, Air Quality, Solar, Pollen | No equivalent | Keep them where they are |
N-Ways has APIs with no Google counterpart too: fare estimates for taxis, okadas, kekes, buses and boats, NIPOST and GhanaPost postcode lookups, and routes that keep to okada and keke bans.
A map on a web page
N-Ways maps are MapLibre GL JS maps. The main differences from the Google JavaScript map:
- Coordinates are
[longitude, latitude]in MapLibre (GeoJSON order), not{ lat, lng }. This is the change that catches everyone: swap them. - Zoom levels match closely; MapLibre allows fractional zoom.
- Markers:
new maplibregl.Marker().setLngLat([lng, lat]).addTo(map). Info windows aremaplibregl.Popup. - Shapes (polylines, polygons, circles) are GeoJSON sources with
lineorfilllayers, drawn on the GPU, so thousands of them stay smooth. - Events:
map.on('click', (e) => e.lngLat); the map is ready onmap.on('load').
<link rel="stylesheet" href="https://nways.ng/sdk/v1/maplibre-gl.css" />
<div id="map" style="height: 480px"></div>
<script type="module">
import { createMap, maplibregl } from 'https://nways.ng/sdk/v1/nways-maps.standalone.js'
// Lagos, Allen Avenue. Note the order: longitude first.
const map = createMap({ container: 'map', key: 'YOUR_API_KEY', center: [3.3515, 6.6018], zoom: 15 })
new maplibregl.Marker({ color: '#0b7a3e' })
.setLngLat([3.3515, 6.6018])
.setPopup(new maplibregl.Popup().setText('Pickup'))
.addTo(map)
</script>Web services
- Errors are HTTP errors: a refused key answers
401or403with areason(API_KEY_HTTP_REFERRER_BLOCKED,API_KEY_SERVICE_BLOCKED…), never200with a status word. Many reasons have the same names as Google’s. Errors - Points in requests are
{ "lat": …, "lng": … }orlat,lngin a query; lines in answers are GeoJSON[lng, lat]pairs, not encoded polylines, so they go straight onto a map. - Distances and times are plain numbers:
distanceMin metres,durationSin seconds. - Languages:
lang=enorlang=fr. - IDs are strings you may store for good (
osm:n501540907,ghanapost:GA-183-8164); they aren’t Google place IDs, so look places up again once by name or position.
Plan the move
- Get a project and keys, one per website, app and server, restricted the same way as your Google keys. Get started
- Start with the server side: geocoding and routes are easiest to switch and compare, behind your own backend.
- Run both for a week: send a share of requests to N-Ways and compare answers, ETAs and what your riders say.
- Switch the maps in your web and mobile apps, keeping the credit visible. Attribution
- Re-key stored data: replace Google place IDs with N-Ways IDs as customers come back, or in one batch by position.
- Set caps on each key so a bug can’t run up a bill, then turn off the Google keys you no longer use.
Help moving
Tell us which APIs you use and your monthly volumes at hello@nways.ng: we’ll help you plan the move and estimate your bill.