Google Places API for Hospitals

时间:2018-03-06 11:17:27

标签: google-places-api

我正在使用Google Places API从某个位置搜索附近的医院。我的问题是,我想要知名的大医院,但问题是API正在取得诊所,甚至是牙科诊所。我怎么能更具体? 查询网址:https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=24.9044526,67.077706&type=hospital&radius=500&key=[API_KEY]

Image 1 of 2

Image 2 of 2

虽然它们并不出名,但即使提供的医疗设施也不足以应对紧急情况。

我也试过增加半径但得到相同的响应。

1 个答案:

答案 0 :(得分:0)

我知道这篇文章有点老,但这对我有用:

var request = {
    location: location,
    rankBy: google.maps.places.RankBy.DISTANCE,
    type: "hospital",
    keyword: "(emergency) AND (medical centre) AND (24 hours)",
  };

  service = new google.maps.places.PlacesService(map);
  service.nearbySearch(request, callback);