Google Throttle tentera-t-il d'obtenir l'emplacement de l'utilisateur à l'aide d'appels JSAPI côté client?

StackOverflow https://stackoverflow.com/questions/8948543

Question

J'ai installé ce projet JavaScript qui tente d'obtenir la géolocalisation de l'utilisateur à l'aide de JavaScript côté client.

https://github.com/codejoust/session.js/

Le mécanisme par défaut pour la recherche de localisation est celui de Google jsapi caractéristique.

Google sera-t-il à l'exécution de la capacité de mon application à obtenir ces informations après un certain nombre de demandes?

La fonction en question ressemble à ceci:

gapi_location: function(){
      return function(callback){
        var location = util.get_obj(options.location_cookie);
        if (!location || location.source !== 'google'){
          win.gloader_ready = function() {
            if ("google" in win){
              if (win.google.loader.ClientLocation){
                win.google.loader.ClientLocation.source = "google";
                callback(win.google.loader.ClientLocation);
              } else {
                callback({error: true, source: "google"});
              }
              util.set_cookie(
                options.location_cookie,
                util.package_obj(win.google.loader.ClientLocation),
                options.location_cookie_timeout * 60 * 60 * 1000);
            }}
          util.embed_script("https://www.google.com/jsapi?callback=gloader_ready");
        } else {
          callback(location);
        }}
    },

Pas de solution correcte

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top