0

If there was no internet connection at that moment - program can't execute remote script and create google object. Later i'm trying to reload google maps script like this:

if($.isEmptyObject(google)) {
    $.getScript('https://www.google.com/jsapi?sensor=true', function () {
        google.load("maps", "3");                       
    });             
}

I'm getting this kind of message: Google Maps API server rejected your request. within the sensor parameters must be set to true or false. Why?

4

1 回答 1

1

这对我有用:

if($.isEmptyObject(google)) {
   $.getScript('https://www.google.com/jsapi', function () {
    google.load("maps", "3", {'other_params' : 'sensor=true' });                       
   });             
}
于 2012-09-18T12:46:31.080 回答