开发者

Retrieving Coordinates from just Google Search API alone

开发者 https://www.devze.com 2022-12-30 08:23 出处:网络
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.

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

精彩评论

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

关注公众号