Geocoding parameters including the address query
OptionalcustomTemplate: Partial<GeocodingTemplate>Advanced customization for request/response handling
Promise resolving to geocoded location results
This service is optimized for address lookup and does not return POIs (Points of Interest). For POI search, use the search function instead.
Features:
// Geocode a complete address
const result = await geocode({
key: 'your-api-key',
query: '1600 Pennsylvania Avenue NW, Washington, DC'
});
// Geocode with partial address
const partialResult = await geocode({
key: 'your-api-key',
query: 'Amsterdam, Netherlands'
});
// Geocode with bias towards specific location
const biasedResult = await geocode({
key: 'your-api-key',
query: 'Main Street',
at: [4.9041, 52.3676], // Bias toward Amsterdam
limit: 5
});
// Geocode an intersection
const intersection = await geocode({
key: 'your-api-key',
query: '5th Avenue & 42nd Street, New York'
});
Convert addresses into geographic coordinates (geocoding).
The Geocode service translates addresses and place names into geographic coordinates, enabling you to position markers on maps, calculate routes, or perform spatial analysis.