Sharetribe uses Mapbox and Google Maps to provide geolocation features in your marketplace. These features help your customers and providers connect based on their location or proximity to each other.
How location information is stored
Location information is stored in listings on the marketplace. This information can range from a specific address to broader areas like a city, region, or even an entire country.
The location field is part of the default listing fields for each listing type. Its appearance depends on the transaction process selected for the listing type, though it always serves the same function of storing location data.
βCalendar booking: The location field is labeled as "Location" in the default listing fields. It can also be disabled.
Purchase: The location field is labeled as "Delivery: pickup" in the default listing fields. It can be disabled, or the text can be modified using the Marketplace Texts feature.
β
Free messaging: The location field is labeled as "Location" in the default listing fields. It can also be disabled.
How the map is displayed
Location information for a listing is displayed on a map on both the listing page and the listing search page.
β
The map view of the listing search page shows a map on the right and a grid of listings on the left. The map highlights the locations of various listings in your marketplace, making this layout ideal for location-based products, rentals or services.
β
Users can also search the marketplace by entering a location. This can be a specific address or broader areas like a city, region, or an entire country. The search results will display listings within the specified area.
Map and search
The map feature and the ability to store location information in listings allow your users to search for listings based on their location. Learn more about location search.
When searching for a location on the marketplace and adjusting the map view by zooming in or out, a unique URL string is generated with the coordinates of the searched location. You can copy this URL and use it to redirect users to listings in specific locations.
How to enable location and map features
By default, your Test environment uses Sharetribe's Mapbox token to enable location and map features. When you customize your marketplace with code, or after it goes live, you can use your own Mapbox or Google Maps keys for location services.