Contract for custom geocoding/routing services. Call services yourself and bind results to the map.
| Member / type / return | Meaning |
|---|---|
Future<List<TxCoordinate>> geocode(String query, {TxCancellation? cancellation}) | Queries a custom geographic service for coordinates matching text. |
Future<List<TxCoordinate>> route(List<TxCoordinate> points, {TxCancellation? cancellation}) | Queries a custom routing service for a route through waypoints. |
import 'package:tecexpress/tecexpress.dart';
Future<void> example() async {
// An implementation is supplied by your application.
Future<void> locate(TxGeoAdapter adapter) async {
final points = await adapter.geocode('Berlin');
if (points.length >= 2) print(await adapter.route(points));
}
print(locate);
}