Google Maps API - Multiple keywords in place searches

前端 未结 6 2086
青春惊慌失措
青春惊慌失措 2021-02-08 19:58

Is it possible search multiple individual keywords in one place search request using Google Maps JavaScript API v3?

In the Google Places API documentation it states that

6条回答
  •  北恋
    北恋 (楼主)
    2021-02-08 20:18

    EDIT: This appeared to work initially but more results were not reliable and were not predictable. We ended up not being able to use the API in this way for our scenario.

    I use the web service but I assume it should work with all API access points. It took me quite a number combinations to test but I eventually landed on realizing the API required parentheses AND quotes to get multi-word OR conditions to work.

    For example, in url param form:

    keywords=("Place Name 1") OR ("PlaceName2") OR ("Place Name3")

提交回复
热议问题