To configure Google Maps Distance Matrix Service:
You do not need a Google account to get started. The process includes Google account and project creation if needed. This option requires a billing account and payment method added to your Google account to complete configurations and use the algorithm.
Step 1: Create the Google API Key
The key is from the Google Maps Platform and should have Geocoding API and Distance Matrix API enabled. For details, see Configuring Distance Priority Algorithm.
- Visit Google Maps Platform and click Get Started.
To enable the platform, select Maps, Routes, and Places and click
Google Maps Platform for your Key
Sign in with a Google account or create a new account.
Set up a project:
- Select a project or enter a new project name.
- Select Yes to accept the terms.
- Click Next.
Enter a billing account, or create one. You can skip and add a
billing account later. The account is required to use this service.
Click Console to open and configure your Google Cloud Platform
Search for Geocoding API and Distance Matrix API. Select and enable
Expand the menu and click
APIs & Services > Credentials. Copy the
Google API Key.
Google API Key Copy
Step 2: Configure the Google MAP Provider
- On the Admin sidebar, click Stores. Then under Settings, choose
- In the panel on the left under Catalog, choose Inventory.
Distance Provider for Distance Based SSA section, and set
Distance Providers for Distance Based SSA
Google Distance Provider section, and configure the
- Enter the Google API Key, copied from your Google Account.
- For Computation mode, select a configuration.
When using this algorithm for shipping, if routes and data does not
return for the selected Computation mode (driving, bicycling, or
walking) for a shipment, the SSA defaults to using the Source
Priority. We recommend also setting the priority for sources per
- Driving Default setting, requests standard driving directions using
the road network
- Walking Requests walking directions using pedestrian paths and
sidewalks (where available)
Requests bicycling directions using bicycle paths and
preferred streets (where available). The Distance Matrix Service is
currently only available in the US and some Canadian cities.
For Value, select a value type:
- Distance Default setting, returns the distance between points in
metrics (kilometers and meters) or imperial (miles and feet)
- Time to Destination Returns the time required to travel from the
source locations to the shipping address in hours and minutes
Google Distance Provider
When complete, click Save Config .
I hope this will help