infoWindow wont dissapear when switching tabs

Home Forums MapPress Support infoWindow wont dissapear when switching tabs

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11825
    bazel
    Participant

    my map is placed in jquery ui tabs  http://jqueryui.com/tabs/.

    I dont have a problem with map resizing when switching tabs but I had a problem with the infoWindow. When switching from tab with map to another tab  the infoWindow won’t dissapear, it is showing on the other tabs too

    Any help?

    Thanks

    #11827
    Chris
    Keymaster

    Do you have  a URL illustrating this problem?

    #11828
    bazel
    Participant

    No sorry , Im working local.  Google infoWindow is working ok  but not the InfoBox

    #11890
    Chris
    Keymaster

    Hi,

    The problem is that the infobox doesn’t know to close when another tab clicked.

    The easiest thing is to just use the infowindow instead.  But if you’re familiar with javascript and editing your template files, something like the code below may work for you.

    You would need to add this code to the page template where the map is displayed.

    It should close the infowindow for the first map (‘mapp0’) on the screen whenever any tab is clicked (the ‘tabsshow’ event).  You can change the map name using the ‘name’ parameter in the shortcode.  You can also adjust the javascript to trigger only for certain tabs:

    jQuery('body').on('tabsshow', function(e, ui) {
      if (ui && ui.panel) {    
        mapp0.closeInfoWindow();  
      }
    }
    
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.