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

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


Looks like you’ve got it sorted out… the map is now appearing on your page.

The ‘log’ is the console log, and with Firefox/Chrome browers, is available by CTRL-SHIFT-K … then check the Console tab for entries.
A missing Google API key will show up as messages there.

CTRL-SHIFT-K doesn’t do anything for me in Chrome, I use Settings, More Tools, Developer Tools to see the console log.

Wim fixed it for me. He set the map size larger. I think it bombed out at 200 since there weren’t any quakes to show. :smiley:

Many kudos to Wim!

In Chrome, you can simply press CTRL + SHIFT + I to open the Inspect window. Then just select the desired tab (Console, in this case). I don’t see any shortcuts for getting directly to the console.

Thanks :slight_smile: That’ll save me some keystrokes.