Skip Navigation

[Resolved] Map autozoom not working

This thread is resolved. Here is a description of the problem and solution.

Problem:
Map autozoom is not working when map is added to tab

Solution:
You need to add custom JS code to your view's JS box:

You can find proposed solution, in this case, with the following reply:
=> https://toolset.com/forums/topic/map-autozoom-not-working/#post-626377

Relevant Documentation:

This support ticket is created 6 years, 9 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.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by timM-10 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#626342
Screen Shot 2018-03-19 at 4.33.46 PM.png

I am trying to: Make sure my map zooms in to fit all markers

Link to a page where the issue can be seen: hidden link under maps tab

I expected to see: A zoomed in map that shows all markers at best zoom like on a different page I built hidden link

Instead, I got: Way zoomed out and shows entire state of Utah.

#626377

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - I've added following code to your view's JS box:

jQuery(document).ready(function($){
  $("#fusion-tab-mapview").trigger("click");
  $("#fusion-tab-listview").trigger("click");
});

Now I can see that map is loading the marker group as required. Could you please confirm.

#626626

You the man! 🙂 Now working as expected.