0
我在探索Airbnb的工作原理,并对地理搜索感兴趣。我不明白Airbnb如何通过New Zealand找到他们的广告?Airbnb如何实现地理搜索?
如果看一下查询字符串参数:
page:1
location:New Zealand
ss_id:3sdsi3ff
只有位置字符串New Zealand
进入到服务器,但不是像坐标LNG,LAT。
但在响应我们得到以下:
center_lat: -40.900557
center_lng: 174.885971,
geo: {accuracy: 1, district: null, city: null, state: null, country: "New Zealand", country_code: "NZ",…}
accuracy: 1
city: null
colloquial_area: null
country: "New Zealand"
country_code: "NZ"
district: null
market: "Other (International)"
natural_feature: null
result_type: "country"
state: null
state_short: null
success?: true
我们看到,我们得到center_lat: -40.900557 center_lng: 174.885971
坐标,国家:"New Zealand"
,COUNTRY_CODE:"NZ"
那么,如何制作的Airbnb可以检测基于该数据在GET请求中从客户端传递的“新西兰”字符串?
那么有可能在服务器端使用地理编码?我使用nodejs服务器 – Erik 2015-03-19 10:20:14
我认为你可以使用相同的API,因为注意js只是JavaScript ... – kaho 2015-03-19 13:22:47
你的意思是Google Maps API? – Erik 2015-03-19 13:24:21