Skip Navigation

[Closed] Single location zooming to max zoom

This support ticket is created 3 years, 7 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 7 replies, has 2 voices.

Last updated by Luo Yang 3 years, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2068969

hidden link

This map is showing locations from the view below of experts. If you filter the view using the country and there is just one expert shown on the map, the map zooms to the maximum, and doesn't respect the setting in the map block.

The same on an individual expert post: hidden link - the map zooms to the maximum.

thanks,
Ian

#2069637

Hello,

I assume you are using the Toolset Maps shortcode [wpv-map-render] to display the maps, you can setup the attribute "single_zoom" attribute in Maps shortcode, for example:
[wpv-map-render ... single_zoom="10"]

More help:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render
single_zoom. Optional. Defaults to 14. When displaying a map with a single marker, using fitbounds set to on would zoom on the single marker at the maximum zoom level. This attribute overrides that behavior.

#2069693

Hi Luo

This is what I had for the single view: [wpv-map-render map_id="map-3" map_height="300px" map_type_control="off" general_zoom="9" single_zoom="10" street_view_control="off"][/wpv-map-render]

Single Zoom is completely ignored - it automatically zooms to the maximum.

And then likewise here: hidden link

This is using the Map block and when the view is filtered for a single expert the same thing happens - maximum zoom. I have the single zoom set in the Map block.

Seems to me the single zoom switch is being ignored.

#2069819

I have tried it in a fresh WP installation + the latest version of Toolset plugins( both the map shortcode you mentioned above and the map block), it works fine.

So the problem you mentioned above is abnormal, please check 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 all other plugins, and switch to WordPress default theme 2021, deactivate all custom PHP/JS code snippets, and test again

3) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/

4) If the problem still persists, please provide database dump file(ZIP file) of your website, you can put the package files in your own google drive disk, share the link only, I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#2072025

Hi Luo - default theme and all plugins deactivated makes no difference. Will get you a duplicator package tomorrow. Best
Ian

#2072131

Please update here when the database dump file is ready, private message box enabled again

#2072977

Thanks for the details, I am downloading the files, will update here if find anything

#2074369

I can see the problem in your duplicator package, but I have tried the same same settings in another WP installation, there isn't such kind of problem, do you have any clue to reproduce the same problem in a fresh WP installation? otherwise, I need to escalate this issue as an exception.

And currently, you can use custom codes to setup the maxzoom of Google map, for example:

jQuery(document).on('js_event_wpv_addon_maps_init_map_completed', function() {

  // Get the map using our .get_map() method
  var map = WPViews.view_addon_maps.get_map( 'map-1' );
  // Use Maps API .setOptions() method to programmatically change any option on the map.
  if ( map ) {
    map.setOptions({
    	gestureHandling: 'none',
      	'maxZoom': 5,
    });
  }
});

Please replace map-1 with your map ID.

The topic ‘[Closed] Single location zooming to max zoom’ is closed to new replies.