Geocode by Place ID

This functions allows to get result by a place id using Google Maps Geocoder.

Firm

const geocodeByPlaceId = (placeId: string): Promise<google.maps.GeocoderResult[]>;

Usage

import { geocodeByPlaceId } from 'react-google-places-autocomplete';

geocodeByPlaceId('ChIJH_imbZDuDzkR2AjlbPGYKVE')
  .then(results => console.log(results))
  .catch(error => console.error(error));