Map API

Support desk for Villa Belluci Joomla Hotel Template
GK User
Wed Jul 13, 2016 8:50 pm
Hi,

i have a problem with the Map API.I have check the other forum posts an have done the same but it doesn't work. Could anybody give me a hint please?

Image

http://casa-more.com/index.php/contact


best regards
Jerome
User avatar
Fresh Boarder

GK User
Thu Jul 14, 2016 8:06 am
Hi,

You have to also change the following code fragment in the gk.scripts.js file:

Code: Select all
// Google Maps loading
   var loadScript = function() {
      jQuery.getScript("https://maps.googleapis.com/maps/api/js?v=3.exp&callback=gkMapInitialize")
        .fail(function( jqxhr, settings, exception ) {
         console.log('Google Maps script not loaded');
      });      
   };


to:

Code: Select all
// Google Maps loading
   var loadScript = function() {
var api_key = jQuery('.gk-map').data('key');
   jQuery.getScript("https://maps.googleapis.com/maps/api/js?key="+api_key+"&callback=gkMapInitialize")
          .fail(function( jqxhr, settings, exception ) {
           console.log('Google Maps script not loaded');
        });         
   };
User avatar
Moderator

GK User
Thu Jul 14, 2016 9:37 am
Nice, thats it. Many thanks for the quick help.

grz
Jerome
User avatar
Fresh Boarder


cron