Skip Navigation

[Resolved] Need to open the infowindow for all markers

This support ticket is created 3 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 3 years, 4 months ago.

Assisted by: Waqar.

Author
Posts
#2114489

I am loading listing with map location markers but client wanted to have infowindow (popup)(dialog) for all to open bydefault.

I have followed this ticket but i can't see in code or documentation where i can reference all ? Any ideas or hints ?
https://toolset.com/de/forums/topic/maps-open-popup-on-start-load/

My site: hidden link

( function( $ ) {
    $( document ).bind( 'js_event_wpv_addon_maps_init_map_completed', function(){
       //var markerId = jQuery('.markerid').text(); 
        var mapId = Object.keys(WPViews.view_addon_maps.maps)[0];
      
        var map = WPViews.view_addon_maps.maps[mapId];
        var mapsMarkers = WPViews.view_addon_maps.markers[Object.keys(WPViews.view_addon_maps.markers)];
    Object.keys(mapsMarkers).forEach(function(key,index) {   
       var markerId = key;
       var length = mapsMarkers[key]; 
      console.log(key, mapsMarkers[key]);
        var marker = WPViews.view_addon_maps.get_map_marker( key, [mapId] );
      //var marker = mapsMarkers[Object.keys(mapsMarkers)[0]];
       console.log(marker);
    //alert(length);
        WPViews.view_addon_maps.infowindows[ mapId ].setContent( $('div.js-wpv-addon-maps-marker-'+markerId).html());
        WPViews.view_addon_maps.infowindows[mapId].open(map, marker);
      
    });
  //alert(length);
    });
  
})( jQuery );
#2114975

Hi,

Thank you for contacting us and I'd be happy to assist.

I've performed some tests on my website but I'm afraid, I couldn't make this work either. Apparently, the built-in code in the Toolset Maps plugin only allows the opening of one map marker info window, at a time. As soon as another info window opens, the previous one gets closed.

You're welcome to submit a feature request for this at:
https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

For more personalized assistance around a custom code solution, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#2116757

Okay, can your developers tell me a hook or line code where i could comment the code so that i can open multiple popups ? It will be a quick fix for me.

#2119689

Thanks for writing back.

I've discussed it internally and in Toolset Maps, there is only one info window object per map. That same info window is repositioned and its content is updated each time, a different map marker is clicked.

For this reason, I'm afraid, it won't be possible to achieve this using custom code or commenting out some code from the core plugin files.

If it is an absolute requirement, then you'll have to replace the Toolset Maps with a fully custom developed map code, for example:
https://stackoverflow.com/a/11106794