Skip Navigation

[Resolved] Map option “Adjust (zoom) automatically to show all markers at once” issue

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

Problem:

Display a map with multiple markers with zoom and center automatically seted to display all markers at once.

Too much zoom. It shows the entire continent.

Solution:

It is a CSS problem, see details here:

https://toolset.com/forums/topic/map-option-adjust-zoom-automatically-to-show-all-markers-at-once-issue/#post-1230179

Relevant Documentation:

This support ticket is created 5 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 4 replies, has 2 voices.

Last updated by cushmanW 5 years, 9 months ago.

Assisted by: Luo Yang.

Author
Posts
#1227380

I am trying to:
Display a map with multiple markers with zoom and center automatically seted to display all markers at once.

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

I expected to see:
All markers at once with zoom and center levels adjusted properly.

Instead, I got:
Too much zoom. It shows the entire continent.

By the way, with just one marker there is no problem.

I also have a map in the footer section and i have to load the google api in a codefield on the theme options (Avada+child). So, when i'm in a page with toolset maps the google api library is loaded multiple times (one via toolset maps and one via the theme options). It is possible that this generates the problem? Is there a way to tell toolset to not load the google api library (because it's loaded all across the site by the theme)?

#1227610
zoom.JPG

Hello,

I have tried the URL you mentioned above, there isn't similar problem as you mentioned above:
Too much zoom. It shows the entire continent.

See screenshot zoom.JPG

There is on a single marker map displaying in the page bottom.

And here is the document about map shortcode
https://toolset.com/documentation/user-guides/maps-shortcodes/#wpv-map-render

For example you can control the general map zoom level with attribute "general_zoom":
general_zoom. Optional, defaults to 5. When fitbounds is set to off, this one sets the zoom level of the map.

#1228043
map-cush-issue.jpg

Oh, I'm sorry, i forgot to tell you to click on the "mapa" button to display the map view. Here is a screenshot where you can see the issue: hidden link

If you click on "mapa" (as i marked with red underline on the screenshot) you can see the maps view:
hidden link

Theres too much zoom out. Do you think the css style could affect the map? because the div that wrappers the map is with display: none when documents load, until you click on the "mapa" button then it changes to display: block.

Here is the shortcode for the map generated by toolset: [wpv-map-render map_id="map-5" map_width="100%" map_height="500px" single_zoom="12" scrollwheel="off" map_type_control="off" street_view_control="off" marker_icon="//yn4.bc3.mwp.accessdomain.com/wp-content/uploads/2019/01/custom-marker-32x32.png"][/wpv-map-render]

I set the options on the "Fields and Views" wizard to zoom/center automatically when there's more than one marker.

#1228292
js-error.JPG

Thanks for the details, I can see the problem in your website.

And I can see a lots of JS error in that page, see screenshot JS-error.JPG

There might be some compatibility problems in your website, please try these:
1) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/

2) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, deactivate all Custom code snippets, and test again

#1230179

Thank for your help, i tried that but the problem persist. I just figured out that the problem is caused by the css that hides the map. If i put the map view by default the zoom and center works great on every search. I tried using every way to hide an element in css but none works, the only way to make the zoom and center works is not to hide the map view.