开发者

Retrieving Coordinates from just Google Search API alone

is it possible to do that out without a Google API map? 开发者_如何学JAVAI searched everywhere and could not find any help for it.


Certainly. This Google example shows some of their tricks.
http://www.google.com/uds/samples/random/lead.html

Or, using excerpt from my code

var ls = new google.search.LocalSearch();
ls.setCenterPoint('New York');
ls.setSearchCompleteCallback(this, processResults, [ls]);
ls.execute('Barnes & Noble');

and callback

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);
        }
    }
}

General information, I'm sure you've already seen this:
http://code.google.com/apis/ajaxsearch/documentation/

Braveyard in his question also provided working example
Disable Highlighting in Google API WebSearch Result Title

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜