Options
All
  • Public
  • Public/Protected
  • All
Menu

Accepts input in the form of a EtomonLocationQuery and returns matching EtomonLocations.

Hierarchy

  • GeoResolver

Index

Constructors

constructor

  • Parameters

    • googleApiKey: string

      API Key for the Google Places, Autocomplete, and Geocoding APIs (API key must have accesse to all three).

    • pathToGeoIPCity: string

      Path to the Maxmind GeoIP City database.

    • options: GeoResolverOptions = ...

      Extra options

    Returns GeoResolver

Properties

Protected encoder

encoder: EncodeToolsAuto

Protected geoipInstance

geoipInstance: default

googleApiKey

googleApiKey: string

options

options: GeoResolverOptions = ...

pathToGeoIPCity

pathToGeoIPCity: string

Accessors

resolvePriority

Methods

assembleAddressComponents

autocompleteSearch

cacheKey

getCountryInfo

Protected getLocationFromCache

Protected getLocationsFromCache

Protected getLocationsFromCacheCount

getTimezone

Protected loadGeoIp

  • loadGeoIp(path?: string): Promise<default>

Protected makeGoogleRequest

  • Makes a request to a Google API

    Parameters

    • qs: {}

      Query string to be used in the URL for the API request

      • [name: string]: string
    • query: EtomonLocationQuery

      Query to be sent

    • api: string = 'geocode'

      Which Google API to consume

    Returns Promise<unknown>

Protected processGoogleResponse

  • Processes the response of a Google API request, overlaying each result of the API response on top of the original EtomonLocationQueryOrResult

    Parameters

    Returns AsyncIterableIterator<EtomonLocation>

queryFromLocation

resolveLocation

resolveLocationByAddress

resolveLocationByAddressComponents

resolveLocationByIpAddress

resolveLocationByLatitudeAndLongitude

resolveLocationByPlaceId

resolveLocations

Protected resolveLocationsInner

resolveOneLocation

Static geoJSONFromLatLng

Static locationFromQuery

Static queryFromLocation

Generated using TypeDoc