Problem: I have a View that shows a list of results, and in each result I would like to display a thumbnail-sized Google Map showing a custom address field. When I test the View, all the map markers are appearing in the first map, and every map except the first one is centered in the ocean with no markers applied.
Solution: Check the Loop Output to make sure that you have unique IDs on each map, and unique IDs for each map marker. Consider replacing these interactive maps with Static Maps using the Google Static Maps API, and using larger interactive maps on a detail View for each post. Example static map implementation:
<img src="https://maps.googleapis.com/maps/api/staticmap?zoom=13&size=450x150&maptype=roadmap&markers=color:red%7Clabel:S%7C[types field='address-field-slug' format='FIELD_LATITUDE,FIELD_LONGITUDE'][/types]&key=YOURAPIKEY" />
Relevant Documentation: https://toolset.com/documentation/user-guides/display-on-google-maps/
https://developers.google.com/maps/documentation/static-maps/intro
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 |
---|---|---|---|---|---|---|
8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | 8:00 – 12:00 | - | - |
13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | 13:00 – 17:00 | - | - |
Supporter timezone: America/New_York (GMT-04:00)
Este tema contiene 4 respuestas, tiene 2 mensajes.
Última actualización por hace 7 años, 3 meses.
Asistido por: Christian Cox.