Google Places API - find an address using the city

前端 未结 3 741
说谎
说谎 2020-12-17 00:10

I am planning to use Google Places API in order to create an address autocomplete in my web site. My question is about whether my requirements are possible using Google Plac

3条回答
  •  孤城傲影
    2020-12-17 01:02

    This is more a Javascript question than Google Places.

    Use a Javascript routine to validate the form, and, say in case #1, checks that all fields are filled out. On the other hand, for case #2, you could disable/remove the fields you don't want filled out, and post the request with only what you want to send.

    For #3, it's just a question of caching. Use localStorage, or an array, to store the city as key, and the result as value.

提交回复
热议问题