OpenSpace.Gazetteer

Queries a gazetteer service for placename details.  Retrieves information such as the placename’s location and its type.

Summary
OpenSpace.GazetteerQueries a gazetteer service for placename details.
Constructor
OpenSpace.GazetteerCreate a new OpenSpace.Gazetteer instance
Functions
getLonLat
getLocations
_doGazetteerQuery
_getLonLatCallback
_getLocationsCallback

Constructor

OpenSpace.Gazetteer

Create a new OpenSpace.Gazetteer instance

Parameters

Returns

An instance of OpenSpace.Gazetteer

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.

getLocations

getLocations: 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

{Array} An array of {OpenSpace.GazetteerEntry} containing details of the placenames that match this query.

_doGazetteerQuery

_doGazetteerQuery: 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.

_getLocationsCallback

_getLocationsCallback: function(jsonData)

Parameters

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

Returns

{Array} An array of {OpenSpace.GazetteerEntry} containing details of the placenames that match this query.

getLonLat: function(query,
callback)
getLocations: function(query,
callback)
_doGazetteerQuery: function(query,
callback)
_getLonLatCallback: function(jsonData)
_getLocationsCallback: function(jsonData)
This class represents an eastings and northings pair of coordinates in British National Grid (BNG) format
Holds placename details.
Close