Problem:
A Places post type has an address field. When viewing one place, how to show a map with other nearby places?
Solution:
You use a View to create the map as normal, but when inserting the View in a template for Places you include a distance Query Filter to show places within a certain distance of the location which is passed by shortcode attribute 'mapcenter'.
Then when you insert the View in the template you use the types address field to provide the mapcenter attribute, like so:
[wpv-view name="nearby-locations" mapcenter="[types field='home-address'][/types]"]
Relevant Documentation:
https://toolset.com/documentation/user-guides/display-on-google-maps/displaying-markers-on-google-maps/
https://toolset.com/documentation/user-guides/passing-arguments-to-views/
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 |
---|---|---|---|---|---|---|
- | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | 7:00 – 14:00 | - |
- | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | 15:00 – 16:00 | - |
Supporter timezone: Europe/London (GMT+00:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 6 años, 5 meses.
Asistido por: Nigel.