Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1231720

    I found an old post about this topic, and I have the same problem. But the solution in the thread doesn’t seem to work anymore. I can’t find the corresponding entries in the shortcodes.js file.

    https://kriesi.at/support/topic/google-maps-tool-tips-query/ this is the old thread.

    I just can’t find

    
    google.maps.event.addListener(marker, 'click', function() {
    				    infowindow.open(map,marker);
    				});
    

    this in the shortcodes file. Is this not valid anymore or was it never valid?
    Maybe I can do the same via the functions.php?

    best regards

    • This topic was modified 5 years ago by OverlapAT.
    #1232266

    Hey OverlapAT,

    Thank you for the inquiry.

    The script has been moved from shortcodes.js file to enfold\framework\js\conditional_load\avia_google_maps_api.js. Just do the same modification and make sure to toggle the Performance > File Compression settings to regenerate the scripts.

    Best regards,
    Ismael

    #1232519

    Thank you very much.

    If I make this change in a child theme, do I have to do anything else?

    In another topic I saw something about queuing, but that was with the shortcodes file.

    Edit: It looks like it’s now loading both versions of the file and not using the child-theme version. At least the tooltips stay when I click on another marker.
    Edit2: It seems to work after I added this line to the top of the file

    
    var openedInfoWindow = null;
    

    Question still stands though if there’s something I need to do in regards to a child theme. Can those changes be overriden with an update or should it just always work?

    • This reply was modified 4 years, 12 months ago by OverlapAT.
    #1233644

    Hi,

    Sorry for the delay. You will have to deregister the default script and enqueue it back using the new path in the child theme directory if you want to preserve the modification after an update.

    // https://developer.wordpress.org/reference/functions/wp_dequeue_script/
    // https://developer.wordpress.org/reference/functions/wp_register_script/
    // https://developer.wordpress.org/reference/functions/wp_enqueue_script/

    wp_register_script( 'avia_google_maps_api_script' , AVIA_JS_URL . 'conditional_load/avia_google_maps_api.js', array( 'jquery' ), $vn, true );
    

    Please create a change log or a note about the modification for future reference.

    Best regards,
    Ismael

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.