quake-json.php V1.11 is available - needed for HTTPS to USGS website Mar,'17

The USGS is converting to all HTTPS access in March, 2017 so you’ll need this update to keep your earthquake display working after they do the conversion.

I’ve also made it easier to specify the $googleAPI key – use it in the page including quake-json.php instead of changing quake-json.php to add the key.

Saratoga template users should specify $SITE[‘googleAPI’] = ‘your-api-key’; in Settings.php

Standalone users: download from the script page.
Saratoga template users: use the update tool with a query for Base-* Plugin-* 14-Feb-2017 for the update.

Mine is very stand-alone, do I need the whole zip package or just the quakes.php? I must have a very old version, looks like a lot of variable names have changed :oops:

If your version is old, I’d recommend downloading the quake-json.zip file and replace quakes.php (standalone page), quake-json.php and quake-json.js scripts. Put your customizations in the quakes.php script.

Will do, thanks :slight_smile:

[s]Hmmm, uploaded the whole package, added my API key, changed nothing else and I have no map and no errors.

Do I need a different API key for Maps?[/s]

Resolved! See #9 below…

I had the same issue… Did you check these 2 setting in the json script? I didnt have to use a new API key.


$setDistanceRadius  = 150;  // same units as first unit in $setDistanceDisplay

$maxDistance = 150;    // quake must be within this number of miles/kilometers to location

[s]I have those lines live in quakes.php, they are commented out in quake-json.php

I’m using the stand alone page, not in the template.[/s]

Resolved, see below…

oh… I forgot about your standalone script.

Thanks Ken.

Well shoot! Tried google’s simple map example and discovered my API key only works with www. :roll:

I hope we all don’t have that issue once this is fully implemented.

I imagine it’s true for any google maps implementation. I assumed the key was good for the whole domain, but I guess you need a different key for each subdomain :?

It depends on how the key was specified.

If you use *.domain.com then www.domain.com will work but just domain.com won’t (their example is the problem)

I use domain.com/ as the spec… that way it works for domain.com, www.domain.com, and somename.domain.com

Do the spec in the Google API Key control panel.

Thanks, I don’t recall how I specified it. When I went into the Google API Console last night to check I failed at the first step:

From the Project drop-down menu, select the Google Maps Premium project.*

I don’t have that option on the menu so I’ll need to figure that out :?

updated both files.
setDistanceRadius=1500
maxDistance=1500

no map.
i did have map before updating.
any ideas?
thanks
larry

vancamweather.com

http://vancamweather.com/wxquake.php is working OK for me.

thanks niko
larry

Did you check the error? It’s “Google Maps API error: InvalidKeyMapError” so there is something wrong with the API Key you are using.

Yeah, it’s fixed now.

Where can I see the key error? It’s not in the error log. Or perhaps I don’t have a key error. I just got a new developer key today.

I installed the latest version today.

I just don’t have a map - not much of anything.

https://www.m82a1.us/wxquake.php. Attached is a console debug with some issues.

Thanks for any help.

Mort