Google Places API language = zh_cn以其他语言返回结果

时间:2015-09-08 07:58:35

标签: google-maps-api-3 google-places-api

我发送的请求是这样的: https://maps.googleapis.com/maps/api/place/nearbysearch/json?&key=ENTER_YOUR_KEY_HERE&name=&types=restaurant&location=35.79067650569248,107.49634109437466&radius=521711.0&language=en

查询在中国。

我得到的结果如下:

results: [
    {
    geometry: {
    location: {
    lat: 35.737293,
    lng: 107.646029
    }
    },
    icon: "https://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
    id: "759bdf36fa8d5182c6cecb8839d21f5db691ab04",
    name: "海底捞火锅西峰店",
    place_id: "ChIJwQHr9-k9ZjYRkNpSDzYpfTo",
    reference: "CnRrAAAAkM6HlYVwL2mO2sefdojOY7cqX9lQtA_OWt2pFzyGW7p6lj-1oSqFnX3q7_iJtDBGIcoRhqMxriUEXCD4Y8QaBZXhX_7IiqgO_2xHYHN9nWEKOYuPWmuj1V5nTy-D_w-im2OcZVoblKayGDuo2xJTiBIQ2DySEk1zgG1UDKHFnzBxTRoUqsR3fT9UOHrRwOj-hQZZygqxiWo",
    scope: "GOOGLE",
    types: [
    "restaurant",
    "food",
    "point_of_interest",
    "establishment"
    ],
    vicinity: "Xifeng, Qingyang"
    },

这个名字是中文的。有什么我可以做的吗?

1 个答案:

答案 0 :(得分:1)

MrUpsidown在评论中是正确的:Google这个数据库中没有这个地方的英文名称,所以返回Google确实拥有的中文名称是Places API可以在这里做的最好的。