jQuery and Google Maps json response

后端 未结 4 2143
庸人自扰
庸人自扰 2021-01-12 21:33

I am having troubles getting geo location info from google maps api

the code is pretty straight forward

$.ajax({
    type: \"GET\",
    cache: false,         


        
4条回答
  •  [愿得一人]
    2021-01-12 22:14

    I have taken a look at the problem but I cannot figure out what's going on. One thing I did find was that if I add a data parameter to the error and then alert(data.status) it gives code 200. The only place I could find this was to resolve it to the success code for v2?!

    error: function(data) {
        alert(data.status);
    }
    

    Also I'm not sure you can use that jsonp because reading the documentation it seems to put extra paramaters on the querystring? When I removed it the jsonpcallback and change the datatype to json the response code started saying 0.

    Not much help sorry but I've gotta go to work now.

提交回复
热议问题