How to Use Geocoding to Display Postcodes on a Map

by Niharika Sisodia
on Nov 19, 2018

Geocoding definition

Geocoding is the process of converting addresses (postcodes or street names) into coordinates (latitude and longitude). These coordinates can then be displayed on a map.

Geocoding is most commonly used on websites that need to allow visitors to interact with a map. The users might be searching for a point of interest, or for a particular route to a specific destination. In any case, they will need to enter a starting location into a search bar. This can be an exact postcode or location.

How does geocoding work?

The example below uses the TravelTime API to show how geocoding works. The geocoding service can be integrated into any service. Please check the documentation here. Geocoding with this API is free - get an API key here.

The user enters a location into the search bar. The example below shows a starting location of Islington, London.


The geocoder then sends a geocoding request to convert the place name ‘Islington, London, England, United Kingdom’ into the corresponding geographic coordinates. The geocoder returns the response as a latitude and longitude, which can be displayed on a map.


The user could then enter a destination. The example below shows the postcode: N1 2UN.


Again the geocoder converts the postcode into coordinates. These coordinates are displayed on the map.


The journey time can then be calculated between the two places and the route displayed for the user. It is also possible to reverse geocode. Reverse geocoding is translating coordinates into an address.


To start using the free geocoder get a TravelTime API key.


Alternatives to the Google Driving Distance Matrix API

Cost effective alternative to the Google driving distance matrix API. Calculate driving times using the TravelTime Search API. Search from a single origin to 100,000 potential locations.

Niharika Sisodia Sep 27, 2018

5 Ways to do Geocoding for Free

Discover solutions that do geocoding for free. Find out which free geocoders have the best functionality. Convert addresses and postcodes into coordinates.

Evelina Bezubec Sep 9, 2019

How to View and Download a Postcode Area or District Map for Your Business

Create a postcode area or sector map. Use the postcode area map to help with your business. Analyse postcode sectors in relation to your business address.

Evelina Bezubec Aug 13, 2019

Use this Postcode Map Guide to View Postcode Data on a Map

Use the postcode map guide to discover how postcodes are created. View relevant postcode data on a map. Compare a postcode map to a travel time map.

Evelina Bezubec Aug 5, 2019

5 Google Places API Alternatives for Points of Interest Data

Find Google Places API alternatives. Connect to a reliable 'points of interest' database via an API. Improve user experience and perfect your location search tool.

Louisa Bainbridge Jun 14, 2019

A Guide to TravelTime API Limits

Discover the volume of searches you can do per month and per minute on the TravelTime API free plan. You can use more than one search in an API request.

Louisa Bainbridge May 16, 2019