Geolocation fields do not appear

Support MB Geolocation Geolocation fields do not appear

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6503
    anthonycamillerianthonycamilleri
    Participant

    Hi,

    I have installed geolocation, created a field and also put in the api filter. When I do these, instead of getting fields to select the map area, I get a picture of the map and several console errors.

    Any idea what might be going on?

    Console Log: https://pastebin.com/5P0WfS7F
    Screenshot: https://pasteboard.co/GE5OHbu.jpg

    /A

    #6510
    Truong GiangTruong Giang
    Participant

    Hi there,

    I see this error message in your console log: You have included the Google Maps API multiple times on this page. This may cause unexpected errors.

    Maybe another plugins or themes also use google map api. Please try to deactivate other plugins to find the one causes this error and we can find how to resolve it.

    #6514
    anthonycamillerianthonycamilleri
    Participant

    I've deactivated all plugins, and the error still appears - so I would assume the issue is with the theme, which also uses the Google Maps Api.

    The theme I'm using is enfold: https://themeforest.net/item/enfold-responsive-multipurpose-theme/4519990.

    I'm happy to paste you a site login if it would help resolving this.

    #6536
    Truong GiangTruong Giang
    Participant

    Which version of Enfold are you using?

    Thank you.

    #6537
    Truong GiangTruong Giang
    Participant

    If you are using Enfold version 4, please add this to the file functions.php of your child theme (or theme):

    
    add_action( 'admin_enqueue_scripts', function() {
    	if ( wp_script_is( 'google-maps' ) && wp_script_is( 'avia-google-maps-api' ) ) {
    		wp_dequeue_script( 'avia-google-maps-api' );
    	}
    }, 99 );
    
    add_filter( 'gmap_api_params', function( $params ) {
    	$params['key'] = 'AIzaSyAOu8jBXZkLKhNROTGisYaklDAkLIhTfBM';
    
    	return $params;
    } );
    
    #6694
    anthonycamillerianthonycamilleri
    Participant

    That worked. Thanks.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Geolocation fields do not appear’ is closed to new replies.