Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google maps Parse.com云代码谷歌地图API地理编码返回零结果_Google Maps_Http_Google Maps Api 3_Parse Platform_Geocoding - Fatal编程技术网

Google maps Parse.com云代码谷歌地图API地理编码返回零结果

Google maps Parse.com云代码谷歌地图API地理编码返回零结果,google-maps,http,google-maps-api-3,parse-platform,geocoding,Google Maps,Http,Google Maps Api 3,Parse Platform,Geocoding,我编写了以下parse.com云代码函数: Parse.Cloud.define("googleApiLatLong", function(request, response) { Parse.Cloud.httpRequest({ url: "http://maps.googleapis.com/maps/api/geocode/json?address=Mannheim,Opernplatz", success: function(httpRespon

我编写了以下parse.com云代码函数:

Parse.Cloud.define("googleApiLatLong", function(request, response) {
    Parse.Cloud.httpRequest({
        url: "http://maps.googleapis.com/maps/api/geocode/json?address=Mannheim,Opernplatz",
        success: function(httpResponse) {
            console.log(httpResponse.text);
            response.success(httpResponse.text); // This will respond with the contents of the http response
        },
        error: function(httpResponse) {
            console.error('Request failed with response code ' + httpResponse.status);
            response.error('Request failed with response code ' + httpResponse.status);
        }
    });
});
现在它所做的只是调用一个函数并记录结果。URL是对谷歌地理编码API的请求,在浏览器中调用时返回JSON对象,但通过云代码调用时返回零结果


非常感谢您的帮助

您可以尝试使用
API密钥执行
https
请求,请参阅以获取更多详细信息。@ztan但这并不是提供android系统API的真正目的。。。强制开发人员使用RESTAPI。。。