OptionalextendedPostalCodesFor?: GeocodingIndexTypesAbbreviation[]Indexes for which extended postal codes should be included in the results.
Extended postal codes provide additional postal code detail for addresses. By default, they are included for all indexes except geographic areas (Geo).
The available index types are:
PAD: Point AddressAddr: Address RangeStr: StreetXStr: Cross StreetGeo: GeographyGeographic areas (Geo) can have very long postal code lists, so you must request them explicitly when needed.
Optionalfilters?: GeographicFilters & Pick<PlaceFilters, "geographyTypes">Where results may come from. Every filter here excludes results.
It combines GeographicFilters with geographyTypes, which restricts the kinds of geography that
come back. Geocoding has no POI notion, so the rest of PlaceFilters does not apply.
Address or location query to geocode.
The text to convert into geographic coordinates, typically a street address, intersection, city name or landmark. The service tolerates typos and incomplete inputs. Pass it as plain text. The SDK encodes it for the request path, so a value you already encoded is encoded again and can resolve to a different place.
This service is optimized for address lookups and does not return POIs. For POI search, use discoverPlaces instead.
It tolerates typos and incomplete addresses, handles various address formats and supports street addresses, intersections and cross streets. It works with geographies (cities, counties, states, countries) and returns structured address components.
// Geocode a complete address
const params: GeocodingParams = {
query: '1600 Pennsylvania Avenue NW, Washington, DC'
};
// Geocode with bias toward a location
const biasedParams: GeocodingParams = {
query: 'Main Street',
geoBias: { position: [4.9041, 52.3676] }, // Bias toward Amsterdam
limit: 5
};
Parameters for geocoding addresses into geographic coordinates.
Geocoding converts human-readable addresses into latitude/longitude coordinates, so you can place markers on maps or perform spatial operations.