4
我是新的谷歌APIS和iPhone LBS相關的應用程序。我需要知道如何使用谷歌API,並獲得我的GPS位置周圍的酒店列表。如何使用iPhone的谷歌API來查詢我周圍的酒店
這裏通過javascript實現相同的功能。如何在iPhone應用程序上做到這一點?
http://code.google.com/apis/ajax/playground/#localsearch_with_markers
我是新的谷歌APIS和iPhone LBS相關的應用程序。我需要知道如何使用谷歌API,並獲得我的GPS位置周圍的酒店列表。如何使用iPhone的谷歌API來查詢我周圍的酒店
這裏通過javascript實現相同的功能。如何在iPhone應用程序上做到這一點?
http://code.google.com/apis/ajax/playground/#localsearch_with_markers
你嘗試 - http://code.google.com/apis/maps/documentation/places/#PlaceSearches?
它看起來像一個正常的web服務,你可以張貼請求,它應該給你的你周圍所有的賓館的XML/JSON名單..
從網站 -
請求= http://maps.google.com/maps/api/place/search/json?location=40.717859,-73.957790&radius=1600&client=clientId&sensor=true_or_false&signature=SIGNATURE
響應=
{
"status": "OK",
"results": [ {
"name": "Williamsburg",
"types": [ "locality", "political" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"reference": "ClRBAAAAXP...lHAPyHom2aG"
}, {
"name": "Greenpoint",
"vicinity": "New York",
"types": [ "neighborhood", "political" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/geocode-71.png",
"reference": "CkQ_AAAAhd...MF45fwr44Ek"
}, {
"name": "Peter Luger Steakhouse",
"vicinity": "Broadway, Brooklyn",
"types": [ "restaurant", "food", "establishment" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/restaurant-71.png",
"reference": "ClRCAAAAt3...6Nt7k11iQdT"
}, {
"name": "Music Hall of Williamsburg",
"vicinity": "North 6th Street, Brooklyn",
"types": [ "establishment" ],
"icon": "http://maps.gstatic.com/mapfiles/place_api/icons/generic_business-71.png",
"reference": "ClRFAAAAN...6UOKCbjv7Sxy"
},
...additional results ...
],
"html_attributions": [ ]
}