Google Maps API - Multiple keywords in place searches

前端 未结 6 2091
青春惊慌失措
青春惊慌失措 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:24

    I had the same problem as I tried to figure out how to use multiple keywords with one request. At first the answer of @netoale helped me, but this is no longer possible. After some general problems with Google I asked in the support and one of the employees wrote me that it is possible to link several keywords with a simple "|".

    As an example:

    https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=lat,lng&key=API_KEY&keyword=theater|castle|park&rankby=distance
    

    Works for me now.

提交回复
热议问题