Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable limiting location autocomplete to a certain country #1002

Merged
merged 6 commits into from
Jan 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ way to update this template, but currently, we follow a pattern:

## Upcoming version 2019-XX-XX

- [add] Limit location autocomplete by adding an optional country parameter to geocoding call in
both Mapbox and Google Maps integrations. Also updated Mapbox SDK to version 0.5.0.
[#1002](https://github.com/sharetribe/flex-template-web/pull/1002)

## [v2.8.0] 2019-01-17

- [add] Add CLI tool for creating .env file and setting up the environment variables.
Expand Down
9 changes: 9 additions & 0 deletions docs/map-providers.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,15 @@ SearchMap component can't adjust zoom level right for that particular place. The
default bounding boxes defined to different place types in
[Mapbox specific geocoder](../src/components/LocationAutocompleteInput/GeocoderMapbox.js).

### Optional: Restrict location autocomplete to specific country or countries

If your marketplace works only in a specific country or countries it might be a good idea to limit
the location autocomplete to those countries. You can specify whether to use the limitation from
[config.js](../src/config.js). Search for variable `countryLimit` and uncomment the line to make it
active. Provide the country or countries in an array using
[ISO 3166 alpha 2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) format (eg. GB, US, FI). If
there are multiple values, separate them with commas.

## Changing the map providers

### How to change from Mapbox to Google Maps
Expand Down
Loading