How to Add API Key to Responsive Color Google Map for Joomla
In mid-2016 google changed their Maps APIs authentication and usage limits.
change
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.
- Head here https://developers.google.com/maps/documentation/javascript/get-api-key and click on get key.
- Generate an API key and save it somewhere safe (for use and reuse if necessary)
- Extract the mod_profil_responsive_map_v1.1.0.zip file (the responsive map joomla module installer)
- 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.
- Do the same on line 51 of geodata.php located in includes/elements.
- 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.
Hola no me funciona
ReplyDeleteExcellent this helped me to correct an error when loading the module in my site when I add the SSL certificate https.
ReplyDeleteThank you very much
greetings from Mexico
Glad you found it useful. Greetings!
DeleteRyan 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