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.
Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.
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)
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par Il y a 6 années et 5 mois.
Assisté par: Nigel.