Contract for custom geocoding/routing services. Call services yourself and bind results to the map.
interface TxGeoAdapter {
geocode?(query: string, signal?: AbortSignal): Promise<TxCoordinate[]>
route?(points: TxCoordinate[], signal?: AbortSignal): Promise<TxCoordinate[]>
}| Field | Meaning |
|---|---|
| geocode | Queries a custom geographic service for coordinates matching text. |
| route | Queries a custom routing service for a route through waypoints. |
import type { TxGeoAdapter } from '@tekocloud.de/tecexpress'
const example: TxGeoAdapter = { geocode: async query => query ? [{ lat: 52.52, lng: 13.405 }] : [], route: async points => points }
console.log(example)