We are transitioning over to a new forum platform. Please post new issues there. Existing threads will be dealt with here unless you choose to move them over. Visit the new forum


Thread tagged as: Question, Problem

Maps API Issue

I have created a Google API key and it appears to be working on their end. I also added it to my config file. But when I'm in the CMS system and I go to the page I get an error message showing on the map Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details. I open the Javascript console and it says Google Maps API error: ApiNotActivatedMapError. So I have added the code to the config page and enabled it on Google's side. But I get this error while I'm in Perch trying to add a location. Is there another place within Perch that I'm supposed to activate the API?

Sorry I tried to find this in the help but I couldn't find anyone with this specific issue. Thanks

Here is my Diagnostics Report:


Perch: 2.8.34, PHP: 7.0.14, MySQL: 5.5.51-38.2, with PDO
Server OS: Linux, cgi-fcgi
Installed apps: content (2.8.34), assets (2.8.34), categories (2.8.34), perch_blog (5.0), perch_kraken (1.0), perch_comments (1.2), perch_backup (1.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_blog' );
PERCH_PATH: /home/florida3/public_html/_cms
PERCH_CORE: /home/florida3/public_html/_cms/core
PERCH_RESFILEPATH: /home/florida3/public_html/_cms/resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 64M, Memory: 256M, Total max file upload: 64M
F1: 6a33f95eca3667f9e0c39bf5ca2980fe
Resource folder writeable: Yes
DOCUMENT_ROOT: /home/florida3/public_html
HTTP_HOST: floridatestserver3.work
REQUEST_URI: /_cms/core/settings/diagnostics/
SCRIPT_NAME: /_cms/core/settings/diagnostics/index.php
Matt Holovach

Matt Holovach 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you re-saved your map content since adding the key?

Yes I have

Here is the content Template that I'm using

<div style="width:900px;"> 
    <h2><perch:content id="location" type="text" label="Location name" required="true" title="true" /></h2>
    <p><perch:content id="map" type="map" label="Address" width="900" height="400" zoom="15" /></p>

When I'm in the CMS and I load the region It acts like it wants to load something and then flashes to the Oops error message. I'm obviously doing something wrong but I just don't know what.

Thanks for your help Drew

Drew McLellan

Drew McLellan 2638 points
Perch Support

Does the default example map template work on a test region?

How would you like me to set it up? I currently have it set up as a content region. I believe the above markup was the default example except for changing the div size.

Yes, it doesn't load on the website. But my main problem is it doesn't load with in the Perch CMS back end. If I could get it to load in Perch it would probably load on the website. I have even checked the API stats in the API manager and it is showing that my many attempts at loading the API is returning a 200 success code. So I believe things are set up correctly.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Have you enabled the key for both the Maps JavaScript API and the Static Maps API?

Yes sir that was the problem. I had only enabled the Static Maps API and not the JavaScript API. That problem is now fixed.

I have a new problem now that the Javascript is loading it isn't finding any address. When I click the Find button it just stays hovering over London. (Which would be great if my client was in London, but not so much if they are in Florida ;-) )

I have done the following to attempt to remedy the situation:

  • Deleted the map region inside of the CMS

  • Republished all pages

  • logged out of the CMS and back into the system

  • Refreshed the page so the content region showed up again in Perch

  • Added the following address "2220 Bloomingdale Ave, Valrico, FL 33596"

  • Clicked the Find Button and all I get is London

Drew I'm sorry for this I feel like an idiot but I want to learn to use the map system because it would be very handy for my clients, but I can't seem to get it to work. Thank you again for all of your help.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Very curious! Do you see any errors in the browser console?

I do not.

I use Chrome browser so I hit f12 and switched to console tab and no errors are showing up.

Figured it out I had to have

JavaScript API, Static Maps API, and the Geocoding API all enabled. The error only popped up if I clicked the find button then the geocoding error popped up. We are good now. Thanks Drew.