Namespace: Geo

Geo

Handle interaction the Google maps geocode API

Source:

Members


<private, static, constant> _GEOCODE_API :string

Path to Google's geocode api

Type:
  • string
Default Value:
  • http://maps.googleapis.com/maps/api/geocode/json
Source:

<private, static, constant> _LOC_CACHE :app.Geo.Cache

Location cache

Type:
Source:

Methods


<private, static> _addToCache(point, location)

Try to get (@link app.Geo.Location} from cache

Parameters:
Name Type Description
point string

a geolocation

location string

description

Source:

<private, static> _cleanPoint(point) → {string}

Make sure point is in fixed point notation

Parameters:
Name Type Description
point string

'lat lng' may have exponential notation

Source:
Returns:

'lat,lng' fixed point notation

Type
string

<private, static> _getFromCache(point) → {app.Geo.Location|undefined}

Try to get (@link app.Geo.Location} from cache

Parameters:
Name Type Description
point string

a geolocation

Source:
Returns:

location, undefined if not cached

Type
app.Geo.Location | undefined

<static> app.PhotoSource.createPoint(lat, lon) → {string}

Create a geo point string from a latitude and longitude

Parameters:
Name Type Description
lat number

latitude

lon number

longitude

Source:
Returns:

'lat lon'

Type
string

<static> get(point) → {Promise.<string>}

Get the location string

Parameters:
Name Type Description
point string

'lat,long'

Source:
Returns:

geolocation as string

Type
Promise.<string>

Type Definitions


Cache

Cache of Geo Locations

Type:
  • Object
Properties:
Name Type Description
entries Array.<app.Geo.Location>

Array of locations

maxSize int

max entries to cache

Source:

Location

A Geo location

Type:
  • Object
Properties:
Name Type Description
loc string

descriptive location

point string

geo location 'lat lon'

Source: