Skip to Content
⚠️Active Development Notice: TimeTiles is under active development. Information may be placeholder content or not up-to-date.

web


web / lib/services/geocoding/geocoding-service

lib/services/geocoding/geocoding-service

Defines the main GeocodingService class, the public interface for all geocoding operations.

This class acts as a facade, orchestrating the various components of the geocoding system, including the provider manager, cache manager, and the core operations logic. It is responsible for initializing the service, loading configurations, and exposing the primary methods for single-address geocoding, batch geocoding, and configuration testing.

The service is designed to be initialized once and then used throughout the application. It handles loading settings and provider configurations from the database and environment variables.

Classes

GeocodingService

Constructors

Constructor

new GeocodingService(payload): GeocodingService

Parameters
payload

BasePayload

Returns

GeocodingService

Methods

initialize()

initialize(): Promise<void>

Returns

Promise<void>

geocode()

geocode(address): Promise<GeocodingResult>

Parameters
address

string

Returns

Promise<GeocodingResult>

batchGeocode()

batchGeocode(addresses, batchSize): Promise<BatchGeocodingResult>

Parameters
addresses

string[]

batchSize

number = 10

Returns

Promise<BatchGeocodingResult>

testConfiguration()

testConfiguration(testAddress?): Promise<Record<string, unknown>>

Parameters
testAddress?

string

Returns

Promise<Record<string, unknown>>

refreshConfiguration()

refreshConfiguration(): Promise<void>

Returns

Promise<void>

cleanupCache()

cleanupCache(): Promise<void>

Returns

Promise<void>

References

BatchGeocodingResult

Re-exports BatchGeocodingResult


GeocodingResult

Re-exports GeocodingResult


GeocodingError

Re-exports GeocodingError

Last updated on