Google Maps Services Node Client

    Class Client

    Client is a light wrapper around API methods providing shared configuration for Axios settings such as retry logic using the default retry-axios settings and gzip encoding.

    const client = Client()
    
    const client = Client({config})
    
    const axiosInstance = axios.create(config)
    const client = Client({axiosInstance})
    Index

    Constructors

    Methods

    • An example use of this function.

      import { Client } from '@googlemaps/google-maps-services-js';

      const args = {
      params: {
      key: '<your-api-key>',
      address: 'Perth 4WD & Commercial Centre',
      }
      };
      const client = new Client();
      client.geocode(args).then(gcResponse => {
      const str = JSON.stringify(gcResponse.data.results[0]);
      console.log(`First result is: ${str}`);
      });

      Parameters

      Returns Promise<GeocodeResponse>

    • Returns string[]

    • Parameters

      • ...ids: string[]

      Returns void

    MMNEPVFCICPMFPCPTTAAATR