{% load url from compat %}

lookup by point

URL:
  • /point/[SRID]/[x],[y]
  • /point/[SRID]/[x],[y]/box
Parameters:

SRID is a unique number referring to a particular co-ordinate system; {% if country == 'GB' %} the ones you probably are interested in are 27700 for British National Grid, 4326 for WGS84 lon/lat, and 29902 for the Irish National Grid. {% else %} the one you probably are interested in is 4326 for WGS84 normal lon/lat. {% endif %}

x and y are the co-ordinates of the point in the co-ordinate system; note that x,y means longitude,latitude.

Optional query parameters:
  • type, to restrict results to a particular area type or types (multiple types separated by commas);
  • generation, to return results for a previous generation.
  • min_generation, to return results since that generation.
Returns:

A hash of the areas that the point is contained within. If the /box version is used, only the area bounding boxes are considered.

{% include "mapit/api/point-example.html" %}
{% if postcodes_available %}

lookupnearest postcode

URL:
/nearest/[SRID]/[x],[y]
Parameters:
Same as for by point.
Returns:
The postcode closest to the particular point. {% include "mapit/api/point-example-nearest.html" %}
{% endif %}