This is an attempt to make a tool which identifies which UK area you are in without using a third-party service. It either uses the location provided by your browser or you can manually provide a latitude and longitude. It then loads an appropriate GeoJSON file to work out which area you are in.
Some of the area boundaries have been simplified to reduce bandwidth usage. If you use these rougher lookups you may be identified with the wrong area if you are near a boundary.
Privacy
The initial aim for this project was to start from the perspective of privacy. We load the areas for the whole country into your browser and the appropriate polygon is found using your location. Your exact location doesn't leave your device. The trade off is that we may have to send a relatively large geographic file to your browser. We've tried various tricks to shrink those files as much as we can. Some of the options use smaller files that will be less accurate.
The options labelled "less privacy" still don't send your exact location out of your browser but they can, theoretically, allow our server to have an idea which part of the country you are in. They use much less data because they first load a summary of the "bounding boxes" of each area. In the browser they find which bounding boxes contain your location and then they requests the actual boundaries of just those specific polygons. They do this by using range requests to get the specific features from a GeoJSON file. So our server doesn't get to know your actual coordinates but, for the "less privacy" options, it will know which polygon(s) you requested. This is why this option will only display the matched area; it hasn't downloaded the whole country.
© Stuart Lowe (Open Innovations), MIT licence