Another strange one.

I've been running the google.loader.ClientLocation for about a month
on my site www.HearWhere.com, and it seems most people are able to
access it without a hitch.

I arrived in the US on Monday, and I always get a 'null'  value when
trying to return google.loader.ClientLocation.
I never had this issue when i was in canada.

It makes it almost impossible to work on this as I now can't get a
proper location.

My code seems pretty simple, and I've added a catch in dev to that the
site doesn't breakdown, but I find it very strange that the
ClientLocation can find me in Whistler, BC, Canada, but not in Silicon
Valley!

Here's the code I'm using
[code]
 if(google.loader.ClientLocation!=null){
  var cl = google.loader.ClientLocation;
        alert(cl);

        var location = [cl.address.city, cl.address.region,
cl.address.country].join(', ');
alert(cl.address.county);
         if(cl.address.country=='USA'){
         $('#kms').remove();
         $('#measure').val('miles');
         }
         if(cl.address.country!='USA'){
         $('#miles').remove();
         $('#measure').val('kms');
         }
    if ($('#address').val()==null || $('#address').val()==''){
                $('#address').val(location);
                }
                }
[code]

If I remove 'if(google.loader.ClientLocation!=null){' , i get ' cl is
null'  error in firebug
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to