Pages: [1]
Print
Author Topic: Google Response Not Handled  (Read 291 times)
DigitalFire
Download
Newbie
*
Posts: 4


« on: November 24, 2011, 10:21:43 AM »

Hi,

I've just setup LiteRadius and the install process seems to have completed fine. The files are in place, the DB was populated successfully, and I've created a Google API Key (I turned on both v2 and v3 of Maps just to be safe, it all uses just one key) and plugged it in.

However, nothing which requires communication with Google works. I know the request is being sent out properly; when I view the API console I now see that 16 requests were made of it, but the LR code doesn't seem to be able to do anythin with it. On the demo no locations are found and in my own efforts to geolocate an address, any address, it replies with "Address Not Found."

Any ideas if I've overlooked a setting or if further information is needed?

Thanks.
Logged
Support
Administrator
Jr. Member
*****
Posts: 97



« Reply #1 on: November 25, 2011, 09:00:19 AM »

Can you please verify the following:

1 - Are you testing the program with the default location data (us_filter.txt)?
2 - Are you able to manually geo-code individual locations?
3 - What do you mean by:
Quote
I turned on both v2 and v3 of Maps just to be safe...
Google maps Version 3 is not supported.

Logged
DigitalFire
Download
Newbie
*
Posts: 4


« Reply #2 on: November 25, 2011, 11:16:32 AM »

I assume it's with the default values - all I have done so far is the following:
- Created a DB and updated database.php with the connection information.
- Uploaded all files the files which were extracted from the .zip to a sub-folder inside public_html
- Added the Google API Key

That was the initial setup and seemed to go fine. Then I tried to enter a single custom address under "Add new location." I would put in an address (I tried several different levels of exactness) and click on "Find Coordinates" which would load the address in the new window but clicking on "Get Longitude and Latitude" always says "Address Not Found."

That's when I imported us_filter.txt first and ca_filter.txt after. Both imported with no trouble at all and when I tried to run a batch geocode on the lists it seemed to be working - except it didn't. Every single address was given the coord's 80.000000, 80.000000.

Quote
Google maps Version 3 is not supported.
I wasn't sure which it used so I turned both features on in Google. v3 shouldn't interfere with v2, it's just a big list of what google services you want your API key to be able to talk to. It is maps2 which is getting the requests from the domain.
Logged
Support
Administrator
Jr. Member
*****
Posts: 97



« Reply #3 on: November 25, 2011, 01:56:52 PM »

Is your installation of LiteRadius running on your personal computer where you access the web page with a url starting with localhost, or is LiteRadius installed on a web server with a domain name?
Logged
DigitalFire
Download
Newbie
*
Posts: 4


« Reply #4 on: November 25, 2011, 05:22:25 PM »

On a web server under a domain name.
Logged
Support
Administrator
Jr. Member
*****
Posts: 97



« Reply #5 on: November 26, 2011, 09:28:55 AM »

OK, let's examine the Google API key. Not being able to recover a latitude and longitude coordinate 80.000000, 80.000000, or the address not found message indicates the Google geocoder is rejecting the API key.

Also, I'm not sure what you did during the installation regarding the statement:
Quote
I turned on both v2 and v3 of Maps just to be safe, it all uses just one key
. What you should have not done is change any LiteRadius code in response to the API key.

On the Google API key sign-up page (http://code.google.com/apis/maps/signup.html) all you do is submit the domain name, and Google generates the API key. The domain entered should be the root domain of your server. For example http://www.mywebsite.com. If you've installed LiteRadius in a sub-domain, like http://asubdomain.mywebsite.com, then you should still generate an API key for http://www.mywebsite.com

That key should be entered into the LiteRadius admin control panel configuration settings and it needs to be inserted in the demo page where it says
Quote
INSERT_YOUR_API_KEY_HERE

If in doubt, please generate a new API key and try again.

Regards,
Support
Logged
DigitalFire
Download
Newbie
*
Posts: 4


« Reply #6 on: November 28, 2011, 10:29:02 AM »

I think your link fixed it for me. I've generated an API Key from there and I was able to geocode a location. I'll do some more testing to be sure but certainly the key I was using was a problem.

Just so everyone knows what I was doing wrong:
- I wasn't sure what address to go to at first and just did a google search for maps API, found v3, and went to the tutorial page. That in turn led me to here:
https://code.google.com/apis/console

- Under "Services" I turned on Maps v2 (and other stuff but it's all just what services you want to be able to access).

- Under "API Access" I just plugged in the key I found there.

Logged
Support
Administrator
Jr. Member
*****
Posts: 97



« Reply #7 on: November 28, 2011, 11:23:00 AM »

Good, glad that got you on the right track.

FYI, links to get the appropriate Google resources are listed in the documentation:

Quote
Logged
Pages: [1]
Print
Jump to: