OpenSpace.Postcode

Queries the postcode service for the postcode’s position.

Summary
OpenSpace.PostcodeQueries the postcode service for the postcode’s position.
Constructor
OpenSpace.PostcodeCreate a new OpenSpace.Postcode instance
Functions
getLonLat
_doPostcodeQuery
_getLonLatCallback

Constructor

OpenSpace.Postcode

Create a new OpenSpace.Postcode instance

Parameters

Returns

An instance of OpenSpace.Postcode

Functions

getLonLat

getLonLat: function(query,
callback)

Parameters

query{String} A placename or a partial placename with a * wildcard.
callback{Function} A function to call with the result.

Returns

{OpenSpace.MapPoint} The location of the first placename that matches this query.

_doPostcodeQuery

_doPostcodeQuery: function(query,
callback)

Parameters

query{String} A placename or a partial placename with a * wildcard.
callback{Function} A function to call with the results.

Returns

{JSON} JSON data containing details of the placenames that match this query.

_getLonLatCallback

_getLonLatCallback: function(jsonData)

Parameters

jsonData{String} JSON data containing details of the placenames that match this query.

Returns

{OpenSpace.MapPoint} The location of the first placename that matches this query.

getLonLat: function(query,
callback)
_doPostcodeQuery: function(query,
callback)
_getLonLatCallback: function(jsonData)
This class represents an eastings and northings pair of coordinates in British National Grid (BNG) format
Close