2012-08-15 76 views
2

我試圖找到合適的Google Places API,需要My Location並返回附近的restaurants獲取我的位置附近的餐館

目前,我只能在「特定」城市找到餐廳。

https://maps.googleapis.com/maps/api/place/textsearch/xml?query=restaurants+in+Sydney&sensor=true&key=*MyKey* 

有沒有辦法實現這個?

+0

你是什麼意思的實現? – 2012-08-15 06:46:37

+0

實現Google Places API,它接受「我的位置」[而不是我的城市]並返回附近的「餐館」.. – user188995 2012-08-15 06:52:41

+0

您是否正在創建任何Web應用程序,如果使用任何可取的語言i:e php。 – 2012-08-15 06:56:06

回答

2

這是你在找什麼?

https://maps.googleapis.com/maps/api/place/search/xml?location=49.260691,-123.137784&radius=500&sensor=false&key=*PlacesAPIKey*&types=restaurant 

類型是可選的

+0

是的。這種方式我正在尋找。我已經找到了它,但在分配「lat」和「long」時遇到了麻煩。我想讓腳本自動確定「lat」和「long」。 – user188995 2012-08-16 11:25:05