Frank -- It looks like you lost a lot of the code that is needed to run that section of code. Try getting Firebug and running your code. There are multiple errors -- and the problem isn't related to the API but rather the Javascript you are writing.
-Ben On Wed, Aug 27, 2008 at 8:42 AM, Frank Peterson <[EMAIL PROTECTED]>wrote: > > This is something new Google is doing and the documentation on it is > sparse. > > Google mentioned it in this blogpost: > http://googleajaxsearchapi.blogspot.com/2008/08/howd-they-do-that.html > Then I looked at the docs for it > http://code.google.com/apis/ajax/documentation/#ClientLocation > > I modified it to look like this > _____ > > <script type="text/javascript" src="http://www.google.com/jsapi? > key=MYAPIKEY <http://www.google.com/jsapi?key=MYAPIKEY>"></script> > <script type="text/javascript"> > google.load("feeds", "1"); > function initialize() > { > > InTheNews.prototype.setDefaultLocation_ = function() > { > alert('inside'); > this.currentState_ = this.options_.startingState; > if (google.loader.ClientLocation && > google.loader.ClientLocation.address.country_code == "US" && > google.loader.ClientLocation.address.region) > { > // geo locate was successful and user is in the > states. range check > // the region so that we can safely use it when > selecting a state > // level polygon overlay > var state = > google.loader.ClientLocation.address.region.toUpperCase(); > alert(google.loader.ClientLocation.address.city); > if (InTheNews.stateNames[state]) > { > this.currentState_ = state; > } > } > this.currentCountry_ = "US"; > } > > } > google.setOnLoadCallback(initialize); > </script> > _____ > > Unfortunatey its not doing the alerts, but the thing is I'm not even > sure how to call that function or make it run it. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google AJAX 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-AJAX-Search-API?hl=en -~----------~----~----~----~------~----~------~--~---
