Different settings for responsive interaction

New home Forums Pro Add-on Different settings for responsive interaction

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #36530
    Majse
    Member

    Hi!

    For desktop I would really like to use hover on the markers. But for mobile and tablet I would like the markers to be clickable. Is there a way to do this?

    Best regards

    #36532
    SupportTeam
    Moderator

    Hi there,

    Thank you for getting in touch with us.

    If you enable hover state under Maps → Settings → InfoWindows → “Open Markere InfoWidnows by” option you should open your markers on hover. On mobile devices markers will open when you touch marker. Is this what you want?

    Thank you for your time in this.

    Best regards,
    Jarek

    #36539
    Majse
    Member

    Hi Jarek,

    Thank you for the quick response. I have now set it for hover, but for some reason it won’t work on any mobile devices. You can’t click on them.

    Best regards

    #36540
    SupportTeam
    Moderator

    Hi there,

    May I ask you to send me a temporary login details to your WordPress admin dashboard so I can login and look further into this for you? Please mark your reply as private to protect your data.

    Kind regards

    #36543
    Majse
    Member
    This reply has been marked as private.
    #36553
    SupportTeam
    Moderator

    Hi there,

    I installed small plugin: Simple Custom CSS & JS and created JS code:

    (function($) {
    
        function bindClickListener(marker, id) {
        
            marker.addListener("click", function() {
              google.maps.event.trigger(marker, "mouseover");
            });
        
        }
    
      if( /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent) ) {
      	setTimeout(function() {
        	$(window).on("load", function(event) {
        
            	for(var marker_id in marker_array[1]) {
                	bindClickListener(marker_array[1][marker_id], marker_id);
            	}
        
        	});
      	}, 500);
      }
    
    })(jQuery);

    to force opening info window on click on mobile devices. Please note that this would only work for map with ID: 1. If you would like to add it to other maps we need to add more code.

    Please test it and let me know if it works.

    Best

    #36562
    Majse
    Member

    Hi Jarek,

    In order to customize the map for responsive interactions, I created four identical, yet seperate maps. Therefore I have three ID’s.

    Best regards

    Attachments:
    You must be logged in to view attached files.
    #36565
    SupportTeam
    Moderator

    Hi there,

    I modified script a bit so it should work with other maps.

    Kind regards

    #36585
    Majse
    Member

    Beautiful work. Thank you!

    Best regards

    #36590
    SupportTeam
    Moderator

    Thank you for your kind words. I appreciate it 🙂

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