Okay
  Public Ticket #865087
Google Map not working
Closed

Comments

  •  2
    scott started the conversation

    Hi,

    I've upgraded to the latest version and added the Map API key. However the map functionality does not work in the admin panel.  Tracked this down to the following (I think) ...

    in laborator_actions.php the function laborator_init() registers the API script with the correct API Key

    wp_register_script( 'google-map', '//maps.google.com/maps/api/js?libraries=geometry&key=' . esc_attr( $google_api_key ), null, null );

    This script is queued in the contact page template file contact.php and is output to the end user but I can't see where the script is queued for the admin panel. Adding 

    if ( is_admin() ) {
       wp_enqueue_script('google-map');
    }

    after the initial script register gives me the ability to configure the map and it now displays in the browser too.  Although I'm not sure that it works 100% as once I'd set a test location I could not change it.  Why I don't know - I'm developing on a local machine? I ended up changing the longitude and latitude in the DB to get round it.

    Thanks


  •  1,558
    Laborator replied

    Hi Scott,

    Can you please download this file and replace it in this directory (of the theme): /inc

    This should fix the issue!


    Best regards,
    Laborator Team


      Documentation         Join Kalium Users Group