How to Add API Key to Responsive Color Google Map for Joomla

In mid-2016 google changed their Maps APIs authentication and usage limits.

Google announced some changes to the Google Maps APIs authentication and usage limits: http://googlegeodevelopers.blogspot.com.au/2016/06/building-for-scale-updates-to-google.html Usage of the Google Maps APIs now requires a key. If you are using the Google Maps API on localhost or your domain was not active prior to June 22nd, 2016, it will require a key going forward. To fix this problem, please see the Google Maps APIs documentation to get a key and add it to your application: https://developers.google.com/maps/documentation/javascript/get-api-key


The result of this was that joomla modules for maps began to show an error message. The solution for fixing this in the colourful Responsive color google map v1.1.0 is to include an API key as follows.

  1. Head here https://developers.google.com/maps/documentation/javascript/get-api-key and click on get key.
  2. Generate an API key and save it somewhere safe (for use and reuse if necessary)
  3. Extract the mod_profil_responsive_map_v1.1.0.zip file (the responsive map joomla module installer)
  4. Locate the helper.php file in the folder root and include your api key on line 42 like so

change
$document->addScript('http://maps.googleapis.com/maps/api/js?sensor=false&v=3.exp&libraries=weather');
to
$document->addScript('http://maps.googleapis.com/maps/api/js?key=your_google_map_api_key&sensor=false&v=3.exp&libraries=weather');
Where your_google_map_api_key is the key you generated.
  1. Do the same on line 51 of geodata.php located in includes/elements.
  2. Save the files and repackage your module by zipping the folder mod_profil_responsive_map

You may now use it for future installations of the module.

Comments

  1. Excellent this helped me to correct an error when loading the module in my site when I add the SSL certificate https.
    Thank you very much
    greetings from Mexico

    ReplyDelete
  2. Ryan Van Wagenen Best Technology Consultant for Business After a career in private equity, Ryan Van Wagenen decided to believe in himself and start his own technology consulting group in 2008..

    ReplyDelete

Post a Comment

Popular posts from this blog

The Mysterious Subframe Bushings: When Your Vehicle Clunks And Swerves And You've Done It All With No Resolution.

Dusk To Dawn Photocell Wiring Guide - Automating Your Outdoor Light

Easy Step By Step Guide to Using Google NotebookLM - A Personalized Research Assistant.