Skip Navigation

[Resuelto] Set a default level of zoom for a map with many pins.

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

Setup the center of Google map when "fitbounds" is off.

Solution:

You can try the attributes general_center_lat and general_center_lon, see our document:

Relevant Documentation:

https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render

This support ticket is created hace 3 años, 3 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 3 respuestas, tiene 2 mensajes.

Última actualización por Stephen Vaughan hace 3 años, 3 meses.

Asistido por: Luo Yang.

Autor
Mensajes
#2137979
Not-correct.png
Correct.png

I have a map in a layout which is tied to a listing of locations. Ideally I want the map to render to show the whole of Ireland on page load so there is a proper context for seeing the country. What is annoying is where there are only a certain number of location pins the view of the country is cropped. See the first image. From experience to get the full view of the country you need to have a location pin in the North and another down at the southern tip of the country. I think there should be a way to set a default zoom level sot that the country can be seen fully like in the second image upload.

I have looked at some of the following suggestions but they don't seem to work?

#2138041
General-Zoom-3-Bounds-off.png
Generl-zoom-1-bounds-off.png

Some test so far:

If I use the following the map does its supper zoom out, seems to work and you can click into the clustered pins:
general_zoom="1" fitbounds="off"

But, if you start to adjust the general zoom in closer it start to look broken:
general_zoom="3" fitbounds="off"

The above is working but is not entering around the pins. You can see them if you drag the map down.

#2138543

Hello,

You can try the attributes general_center_lat and general_center_lon, see our document:
https://toolset.com/documentation/programmer-reference/maps/maps-shortcodes/#wpv-map-render
general_center_lat and general_center_lon. Optional, coordinates for the map center when fitbounds is set to off

#2138639

My issue is resolved now. Thank you! That worked perfectly.