Google map api autocomplete restricted/bias to street address in my town

后端 未结 4 1712
一生所求
一生所求 2021-01-05 23:18

I am trying to write a web application for my final year project at uni, and one of the first problems i need to tackle is getting an auto complete text box for local addres

4条回答
  •  一生所求
    2021-01-06 00:15

    It is currently not possible to restrict results to a specific locality except for using bounds as you have done so above. This however, only biases results towards, but not restricted to places contained within the specified bounds.

    If you believe result by locality would be a useful feature please file a Places API - Feature Request.

    As you mentioned, if you type ,Bodmin at the end of your query it is more likely to return local results. A temporary solution might be to use the AutocompleteService and append ,Bodmin to the end of the getPlacePredictions() requests input parameter.

提交回复
热议问题