UK postcodes

sunny-j
sunny-j used Ask the Experts™
on
Greetings Experts,

I have a database table with postcodes and am starting to look at how I can sort them onto a google map or similar to show the location by region of each facility (80,000+ locations) At the moment the table just has a postcode column, no lat/long details.  I am using SQL Server 2014, as well as Visual Studio 2017 and usually create solutions within c# and MVC.

Any guidance on tools out there or the approach i should take much appreciated.

Kind regards.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2018
Distinguished Expert 2018

Commented:
Google Maps offers a GeoCode API which would allow you to pass in a Postcode and retrieve a Geographic Location (Lat/Long) that you could then place on your Map.

As a starting point, have a read up on the official docs: https://developers.google.com/maps/documentation/geocoding/intro

Once you've got your head around the concepts, come back with any specific questions you have.
Pawan KumarDatabase Expert
Awarded 2016
Top Expert 2016

Commented:
As per below site -

Google Maps API provides a geocoding feature, for finding the latitude and longitude of places or addresses; but it does not work for UK postcodes. This is thanks to Royal Mail who have a copyright on the data, and are very restrictive with their (expensive) licenses for it. "

http://www.tomanthony.co.uk/blog/geocoding-uk-postcodes-with-google-map-api/
Most Valuable Expert 2018
Distinguished Expert 2018
Commented:
That info is from a post published 10 years ago. Not sure it's still accurate. I've had no problems getting the location info from Google's GeoCode based on a PostCode.

If you do find problems with it, then take a look at the API from https://postcodes.io/. You can use that to get the Lat/Lng from a postcode

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial