Google Map PostcodeAnywhere Mashup



Postcode

Building

The home postcode and house number is translated to latitude and longitude geocoordinates by a PostcodeAnywhere service via a PHP proxy (postcodeProxy.php) running from this server which forwards the results to the JavaScript in this page. These coordinates are compared with the coordinates of UK outcodes stored in a studb.cms MySQL table (findNear.php service running from stuweb.cms) to return all outcodes within ±0.1 degree longitude and ±0.2 degree latitude (a square of approximately 22 kilometers centred on the postcode). These outcodes are routed via a PHP proxy (outcodeProxy.php) running from this server to the JavaScript in this page. The JavaScript calculates a euclidean distance from home for these coordinates, bearing in mind that in the UK (about 52 degrees North) a degree latitude is approximately twice the length of a degree longitude. The coordinates are sorted by euclidean distance to provide the closest 5 which are added to the map as information push pins.


 
k.mcmanus@gre.ac.uk 2015
Valid XHTML 1.1!. Valid CSS. WCAG priority 3 approved