Google Places API types functionality..

前端 未结 5 861
谎友^
谎友^ 2021-01-17 18:56

    
        

        

        
5条回答
  •  情话喂你
    2021-01-17 19:41

    If the user types Tor in the input field and the output you want is Toronto, ON, Canada then you should use types=(regions), with the brackets.

    I don't know if the option was present when the question was asked, but it is available now.

    Sample Request:

    https://maps.googleapis.com/maps/api/place/autocomplete/json?input=Tor&key=&types=(regions)
    

提交回复
热议问题