googlemaps / googlemaps/google-maps-services-js

`autocomplete`: add support for `locationbias` and `locationrestriction` parameters

Open
#1,011 4 comments 1 reaction 1 assignee Claimed by @wangela View on GitHub
priority: p2 type: feature request
Dominant language
TypeScript
Stars
3.1k
Forks
654
Avg merge
3m
Merged PRs (30d)
4

Description

**Is your feature request related to a problem? Please describe.**
Imagine having a rectangle for which you want to use `placeAutocomplete` to autocomplete places. Currently, only using the epicentre and radius is supported. This yields to many irrelevant autocompletions outside of the rectangle.

**Describe the solution you'd like**
The Google Maps SDK for Place Autocomplete supports `setBounds` with a southwest and northeast coordinate, see the [documentation](https://developers.google.com/maps/documentation/javascript/place-autocomplete#change-search-area). It'd be awesome for this library to support that as well.

**Describe alternatives you've considered**
Now we're using the alternative with radius and filtering afterwards if an autocompletion is within our rectangle. That is an inefficient solution, both looking at requests, API costs and code.

**Additional context**
We'd be willing to support on the implementation when given some guidance.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.