Google Maps API - Multiple keywords in place searches

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

    Did you try with type option. If using type you can get more than one place information

    Please see the possible supported types and RadarSearchRequests try like this

    function performSearch() {
      var request = {
        location: map.center,
        radius: '500',
        types: ['movie_theater', 'gym'],
        rankBy: 'distance'
      };
      service.radarSearch(request, callback);
    }
    

    I don't know 'tacos' is which type. please supported type and give that 'tacos' type value.

    Please let me know if you have any issues

提交回复
热议问题