Closed OscarBarrett closed 3 years ago
Do you have an example query returning car dealer as a type in a geocoding result?
import { Client } from '@googlemaps/google-maps-services-js';
const run = async () => {
const client = new Client();
const result = await client.geocode({ params: {
key: '<key>',
address: 'Perth 4WD & Commercial Centre',
} });
console.log(result.data.results[0].types);
};
run();
[ 'car_dealer', 'establishment', 'point_of_interest', 'store' ]
It's currently typed as
AddressType
, however AddressType does not describe the possible values.For example, geocoding the name of a car dealership I get the following types
Which appear in
PlaceType1
,PlaceType2
,PlaceType2
andPlaceType1
respectively - not a single value fromAddressType
.