Skip to content

Instantly share code, notes, and snippets.

@dalizard
Created July 11, 2011 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dalizard/1075940 to your computer and use it in GitHub Desktop.
Save dalizard/1075940 to your computer and use it in GitHub Desktop.
social.GooglePlaces.prototype.getPlaces = function() {
var self = this;
var map = social.MapModel.getInstance();
var stringSend = 'https://maps.googleapis.com/maps/api/place/search/json';
stringSend += '?location=-33.86705,151.1957362';
stringSend += '&radius=500';
stringSend += '&types=food';
stringSend += '&sensor=false';
stringSend += '&language=bg';
stringSend += '&key=' + social.system.Conf.GOOGLE_PLACES_KEY;
var jsonp = new goog.net.Jsonp(stringSend);
jsonp.setRequestTimeout(10 * 1000);
console.log(stringSend);
var handleResponse = function(e) {
console.log(e);
};
var handleError = function(e) {
console.log(e);
};
jsonp.send(null, handleResponse, handleError);
};
@aleksandrenko
Copy link

goog.net.XhrIo.send(stringSend, handleResponse);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment