Your marketplace may use geolocation services to help providers and customers connect. The most common use of geolocation services is to power search by location, where customers search by location to discover listings nearby. If you plan to use locations in your marketplace, you must integrate a geolocation service.
You don't need to configure a map provider to try out location services in your Test marketplace. Your Test environment already has Mapbox configured.
You can use Mapbox or Google Maps as your geolocation service provider. These must be configured when you are setting up your Live environment if you want to use location search.
โ
If you are not sure which one to choose, we recommend Mapbox due to its generous free tier. It also doesn't use cookies, which means it is more compatible with EU's GDPR regulation.
How to use Mapbox as your location provider
Go the account page.
Locate the
Default public token
or, if you wish to create a new one, click+ Create a token
, give it a name, and make sure all Public scopes are selected. Create the token.Copy the token value
It should look something like
pk.aRanDoMStringofLetterSaNDNumbERs
In your Sharetribe Console Live environment, navigate to Integrations>Map
Select "Mapbox"
Paste the token into the field
Press "Save changes"
You're done! Mapbox is now powering your location services.
How to use Google Maps as your location provider
Go to the Google Maps JavaScript API V3 Reference,
Click on the "Get started" button in the top bar, and follow the instructions to generate your key.
After generating your key, you need to enable certain capabilities
To navigate to the correct setting screen, follow instructions the the Getting Started section of the Places library documentation from Google
Make sure the following capabilities are enabled:
Google Places API Web Service ("Places API")
Maps Static API
Maps JavaScript API
Navigate to "Credentials" in the left-side menu
Press "Show key" and copy the key
It should look something like
aRanDoMStringofLetterSaNDNumbERs
In your Sharetribe Console Live environment, navigate to Integrations>Map
Select "Google Maps"
Paste the key into the field
Press "Save changes"
You're done! Google Maps is now powering your location services.