Class Index | File Index

Classes


Namespace AlphaGeo


Defined in: geo.js.

Namespace Summary
Constructor Attributes Constructor Name and Description
 
Set of methods for getting geo information
Method Summary
Method Attributes Method Name and Description
<static>  
AlphaGeo.councils()
<static>  
AlphaGeo.deleteGeoCookie()
Removes any currently set geo cookies
<static>  
AlphaGeo.locate(String, opts, ignoreKnown, errorSelector)
Based on Matt Patterson's Alphagov Locator jQuery plugin
<static>  
AlphaGeo.locationCoords()
<static>  
AlphaGeo.locationName()
<static>  
AlphaGeo.locator_object()
<static>  
AlphaGeo.readAndParseJSONCookie(String)
Namespace Detail
AlphaGeo
Set of methods for getting geo information
Requires:
AlphaGov, core.js
Method Detail
<static> AlphaGeo.councils()
			AlphaGeo.councils()
Returns:
A string containing the current "friendly name" for the current location, set in the cookie, or false if no cookie found.

<static> AlphaGeo.deleteGeoCookie()
Removes any currently set geo cookies
			AlphaGeo.deleteGeoCookie()
Returns:
true

<static> AlphaGeo.locate(String, opts, ignoreKnown, errorSelector)
Based on Matt Patterson's Alphagov Locator jQuery plugin
			AlphaGeo.locate("#global-locator-form", "{ 
				ignoreKnown: false, 
				errorSelector: '#global-locator-error',
				noJSSubmit: false
				}")
Parameters:
String
id Selector ID for the element containing the location feature widget (Can be the form ID or the container)
{Object} opts Optional
Options. Options
ignoreKnown
Set to false if you want to ignore the known value if it has been set, on page load
errorSelector
A selector where error messages will be shown
Returns:
false

<static> AlphaGeo.locationCoords()
			AlphaGeo.locationCoords()
Returns:
A string containing the current "friendly name" for the current location, set in the cookie, or false if no cookie found.

<static> AlphaGeo.locationName()
			AlphaGeo.locationName()
Returns:
A string containing the current "friendly name" for the current location, set in the cookie, or false if no cookie found.

<static> AlphaGeo.locator_object()
			AlphaGeo.locator_object()
Returns:
A string containing the current "friendly name" for the current location, set in the cookie, or false if no cookie found.

<static> AlphaGeo.readAndParseJSONCookie(String)
			AlphaGeo.readAndParseJSONCookie("qwerty")
Parameters:
String
name Name of the cookie
Returns:
A JSON object or false if no match found

Documentation generated by JsDoc Toolkit 2.4.0 on Wed Aug 24 2011 11:55:09 GMT+0100 (BST)