• Resolved Datacaixa

    (@datacaixa)


    How can I remove the information on hover maker? I mean, I want to show the marker information only if the user click on it.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author DylanAuty

    (@dylanauty)

    Hi @datacaixa,

    Thank you for getting in touch, we do appreciate your time. Unfortunately, we do not currently have a setting for controlling the hover title functionality.

    That is to say this is directly controlled by the Google Maps API, however, this can be disabled by adding Custom JavaScript to our settings area.

    I have prepared a script which can be copied and pasted into our Custom JavaScript box, available under Maps > Settings > Custom Scripts (Or Advanced Settings depending on your internal build engine).

    Please see the script below:

    jQuery(function($){
      	$(document.body).on('markersplaced.wpgmza', () => {
          for(let m in WPGMZA.maps){
            for(let i in WPGMZA.maps[m].markers){
              const marker = WPGMZA.maps[m].markers[i];
              if(marker && marker.googleMarker){
                google.maps.event.addListener(marker.googleMarker, 'mouseover', function (e) {
                  if(e && e.domEvent && e.domEvent.target){
                      try{
                        e.domEvent.target.removeAttribute('title');
                        e.domEvent.target.parentElement.removeAttribute('title');
                      } catch(ex) {}
                  }
                });
              }
            }
          }
        });
    });

    I hope this helps.

    Thread Starter Datacaixa

    (@datacaixa)

    OK, thank you @dylanauty!

    Plugin Author DylanAuty

    (@dylanauty)

    Only a pleasure, have a nice day!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Remove hint on hover’ is closed to new replies.