Jump to content
TNG Community

Google Maps API key problem


Newark

Recommended Posts

Google maps has totally disappeared from my website. I don't even get the 'For Development purposes only type. (I used to) So i have been for an API key, registered a payment source, copied the key into my site but the maps still do not appear. On the copy of my website that I run on Wampserver/Windows 10, I was getting the Developer map message and having obtained another key, the maps here are now displaying as they should.

I have however discovered the following message by pressing SHIFT/Control/I    whilst on my website (www.ourancestralheritage.com)

Google Maps JavaScript API error: js?language=&hl=en&key=AIzaSyD1wqbCC_7hl96ZrdUTo6ORIzDPHB0KjDc:58 Google Maps JavaScript API error:

RefererNotAllowedMapError

https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error

Your site URL to be authorized: http://ourancestralheritage.com/getperson.php?personID=I1598&tree=tree1

Can anyone enlighten me as to what it means and (hopefully) how to correct the problem.

The only set up difference between the 2 keys,  is that I have restricted the one for my website, to my website as recommended (http://*.ourancestralheritage.com/*)

I can't work out a way to restrict the key for my Wampserver site on my pc. All the paths I have entered show no map and a Whoops! Something went wrong, message.

I'm running TNG version 11.1.2

Any help appreciated.  My site was hacked about 18 months ago (which Simply Hosting sorted out very quickly and I've had no problems since other than, just recently I have been receiving lots of spam email - maybe I've been banned by Google as a result? The spam has dropped off since I made my site totally private, a week ago.

Link to comment
Share on other sites

Thanks Klooster, I have followed your link and done exactly what it says. Nothing has changed. On my www website, when I view a record for an individual, all info is there, except there is no map (with or without an error message) showing. It's as if the Maps element of the software package has simply been removed. However, I cannot see any facility for hiding or deleting the maps feature and I certainly haven't been into the back end, as that is really stretching my capabilities further than I am comfortable with.

If I upgraded to Version 12, would that have the effect of restoring it?

Link to comment
Share on other sites

Thanks Newfloridian but I've got this far with Google, I'll persevere. What I have just realised, comparing my Wampserver version of TNG with my www. version is that the, 'Event Map' has disappeared from the blue title bar when viewing an individuals page. I have, 'Personal Information', 'Media Sources', 'All'  & 'PDF' but no 'Event Map' & 'All doesn't produce a map. So where's it gone & why?

Link to comment
Share on other sites

8 hours ago, Newark said:

Thanks Newfloridian but I've got this far with Google, I'll persevere. What I have just realised, comparing my Wampserver version of TNG with my www. version is that the, 'Event Map' has disappeared from the blue title bar when viewing an individuals page. I have, 'Personal Information', 'Media Sources', 'All'  & 'PDF' but no 'Event Map' & 'All doesn't produce a map. So where's it gone & why?

Can you provide login details to your site so that we might log in and see the page for ourselves.

Roger

Link to comment
Share on other sites

Hi Roger, I've un-privatised the site so non living people are visible. I only privatised everything recently because of the junk mail I'm receiving as comments on people, but as that is continuing, I guess I shut the door after the horse had bolted, i.e. After my email address had been recorded by the bots.

So you should be able to see, or rather, not see, the missing 'Maps' tab on an individuals page now.

Link to comment
Share on other sites

Well I'm a bit stumped...

The maps are showing as expected on the Places page - eg 

http://ourancestralheritage.com/placesearch.php?psearch=Amersham%2C+Buckinghamshire%2C+England

so it seems like Google understands where your site is and is allowing maps to show on your pages in general, and so your Map key and setup with Google must be correct. But going to someone who has that place in their data - eg Grace Emily Wike died there

http://ourancestralheritage.com/getperson.php?personID=I2796&tree=tree1

The map is not showing. The Google map key is present in the source code for that page, and there are no error messages in the JavaScript console, so the page is simply not trying to show the map at all.

Do you have any Mods installed that might have anything to do with maps?

If so, or even if it's not obvious, uninstall all the Mods you have installed and see if the map appears on Grace Emily's page with the Mods not installed.

Roger

Link to comment
Share on other sites

SOLVED 

Thanks to all who have deliberated on this but the answer turns out to be simply that all my places have a blank selected as Tree, i.e. No tree is linked to any of my  places. I only have one tree and going to each place in the Admin section (where the map is shown) and selecting the tree to link from the drop down box, instead of the blank space, and saving, brings the tree up on the individuals linked to that place, as it should do. 

Quite how the tree link has been disconnected is a mystery, the fact that 48 pages of places have been de-linked infers that it must have been a one off event. It's happened during the summer as the developer map was there back in the spring, when I was last working on my site. Long job reconnecting as I can't see a way to do a bulk re-connect. 

Another bit of the learning curve completed!

Link to comment
Share on other sites

Places without tree assignment should display in Google Maps or OpenStreetMaps correctly.  Did you set the option correctly for Pooling Places in Admin > Setup > General Settings in the Miscellaneous section for  Assign Place records to Trees:

1 hour ago, Newark said:

Long job reconnecting as I can't see a way to do a bulk re-connect.

You can assign a tree to all your pages by changing the option for Assign Place records to Trees from No to Yes. 

Link to comment
Share on other sites

Thank you Ken. Changing the 'Assign place records to trees', from Yes to No has restored all maps to everyone, so I don't have to go through every place record assigning a tree. Phew!  I guess I must have changed that setting at some time but as I only have one tree, I don't know why and I certainly don't remember doing it. So, in summary, I had it set to Yes but with no tree assigned to each place name, result=no maps show.

Clearly, I must have had two issues, there must have been a problem with the API key, solved by Kloosters original post and then the Assign place records to trees setting, identified by yourself.

Thanks once again, one and all.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...