Okay
  Public Ticket #877775
Google Maps API error
Closed

Comments

  •  2
    Robert started the conversation

    The Google Maps element in GoCargo is throwing a javascript error because, I think, it doesn't have a Google Maps API key. I created a key but can't find a place to add it to GoCargo. It's visible on the front page of the site, near the bottom. 



  •  2,148
    Ocean replied

    Hello,

    I see you use other google map for your website, you can edit code in file functions.php for fixed this bug.

    In file functions.php (with path: wp-content/themes/gocargo/functions.php)
    
    Find line code : 
    
    wp_enqueue_script( "gocargo-mapapi", "$protocol://maps.googleapis.com/maps/api/js", array(), '20151228', false );
    
    Change to :
    
    wp_enqueue_script( "gocargo-mapapi", "$protocol://maps.googleapis.com/maps/api/js?key=AIzaSyAvpnlHRidMIU374bKM5-sx8ruc01OvDjI", array(), '20151228', false );
    

    Thank you