A geocoder place id request allows you to geocode an address from an place id.
First of all, let's build a geocoder place id request:
use Ivory\GoogleMap\Service\Geocoder\Request\GeocoderPlaceIdRequest;
$request = new GeocoderPlaceIdRequest('place_id');
The geocoder place id request constructor requires an place id as first argument.
If you want to update the place id, you can use:
$request->setPlaceId('place_id');
It specifies a type will restrict the results to this type. If multiple types are specified, the API will return all addresses that match any of the types.
use Ivory\GoogleMap\Service\Geocoder\Request\GeocoderAddressType;
$request->setLocationTypes([GeocoderAddressType::COUNTRY]);
It specifies a type will restrict the results to this type. If multiple types are specified, the API will return all addresses that match any of the types.
use Ivory\GoogleMap\Service\Base\GeometryLocationType;
$request->setLocationTypes([GeometryLocationType::APPROXIMATE]);
If you want to update the language, you can use:
$request->setLanguage('fr');