我是一个新的 javascript 编码器,所以我想知道如何使用 Yahoo API 获取用户的地理位置并将其发布到我网站上的另一个现有 div。
问问题
133 次
1 回答
0
You can use HTML5 Geolocation to get the latitudes and longitudes of the user and then pass this to Yahoo Placefinder API.
For e.g, the URL to query is:
var geoAPI='http://where.yahooapis.com/geocodelocation='+lat+','+lon+'&flags=J&gflags=R&appid='+APPID;
Notice we are passing the R flag for reverse geocoding.
I hope this helps.
于 2013-04-07T11:54:04.653 回答