Created
July 11, 2011 14:22
-
-
Save dalizard/1075940 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
goog.net.XhrIo.send(stringSend, handleResponse);