From 2d17e6fe487694f876fc7bf9ed09fa1117583222 Mon Sep 17 00:00:00 2001 From: Kimmo Puputti Date: Mon, 13 Aug 2018 09:44:06 +0300 Subject: [PATCH] Add docs for default location searches --- CHANGELOG.md | 6 ++++++ docs/google-maps.md | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e7f34a58..f9e14557 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,12 @@ way to update this template, but currently, we follow a pattern: --- ## Upcoming version 2018-08-XX +* [change] Add support for default locations in the + LocationAutocompleteInput component. Common searches can be + configured to show when the input has focus. This reduces typing and + Google Places geolocation API usage. The defaults can be configured + in `src/components/LocationAutocompleteInput/GeocoderGoogleMaps.js`. + [#894](https://github.com/sharetribe/flex-template-web/pull/894) * [change] Removed the `country` parameter from the search page as it was not used anywhere. [#893](https://github.com/sharetribe/flex-template-web/pull/893) diff --git a/docs/google-maps.md b/docs/google-maps.md index 01c91d96..4fb336cc 100644 --- a/docs/google-maps.md +++ b/docs/google-maps.md @@ -25,3 +25,14 @@ local development, you can add the variable in the Gitignored `.env` file in the ``` REACT_APP_GOOGLE_MAPS_API_KEY=my-key-here ``` + +## Setup common locations to reduce typing + +The location autocomplete input in the landing page and the topbar can +be configured to have specific locations shown by default when the +user focuses on the input and hasn't yet typed in any searches. This +reduces the typing required for common searches, and also reduces the +need to use the Google Places geolocation API that much. + +The default locations can be configured in +[src/components/LocationAutocompleteInput/GeocoderGoogleMaps.js](../src/components/LocationAutocompleteInput/GeocoderGoogleMaps.js).