• Resolved smarru

    (@smarru)


    I am using events manager to add events and associated locations. In the location map, currently it shows the info window on load. I want to hide the info window on load. So I am using the hook ’em_maps_location_hook’ mentioned in the events-manager.js But for some reason the info window doesn’t close. Can someone please help me with this?

    jQuery(document).bind(’em_maps_location_hook’, function( e, map, infowindow, marker ){
    infowindow.close();
    map.panBy(0,0);

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

    Thank you,
    Srilatha

    http://wordpress.org/extend/plugins/events-manager/

Viewing 2 replies - 1 through 2 (of 2 total)
  • try this one and improve accordingly

    http://pastebin.com/9yX6Q5gm

    Thread Starter smarru

    (@smarru)

    Hi Guys, I used below code to hide the infowindow on load and position the marker at center and it worked. Thank you for supplying the map hook.

    jQuery(document).bind(’em_maps_location_hook’, function( e, map, infowindow, marker ){

    setTimeout(function(){ infowindow.close(); var latlng = new google.maps.LatLng(map.center.lat(),map.center.lng()); marker.setPosition(latlng); }, 500);

    });

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Events Manager] Location map hide Info Window on load’ is closed to new replies.