0
是否可以在没有Google API地图的情况下执行此操作?我到处搜索,找不到任何帮助。仅从Google Search API中检索坐标
是否可以在没有Google API地图的情况下执行此操作?我到处搜索,找不到任何帮助。仅从Google Search API中检索坐标
当然可以。这个Google示例展示了他们的一些技巧。
http://www.google.com/uds/samples/random/lead.html
或者,使用摘自我的代码
var ls = new google.search.LocalSearch();
ls.setCenterPoint('New York');
ls.setSearchCompleteCallback(this, processResults, [ls]);
ls.execute('Barnes & Noble');
和回调
processResults: function(searcher) {
if (searcher.results && searcher.results.length > 0) {
for (var i = 0; i < searcher.results.length; i++) {
var result = searcher.results[i];
alert(result.lat + ' ' + result.lng);
}
}
}
一般信息,我相信你已经看到了这一点:
http://code.google.com/apis/ajaxsearch/documentation/
Braveard在他的问题中还提供了工作示例
Disable Highlighting in Google API WebSearch Result Title
感谢您的帮助:)我解决了这个使用另一种方法,前一天已经:D – cheesebunz 2010-07-02 06:26:12