Home › Forums › Calendar Products › Events Calendar PRO › Embedding multiple venue maps
- This topic has 4 replies, 2 voices, and was last updated 12 years, 3 months ago by
Barry.
-
AuthorPosts
-
December 6, 2013 at 2:53 am #80488
maze
ParticipantHi guys,
Have been building a page that client needs to have all events on. I’ve successfully integrated it with Isotope and pulled through the desired event elements for each event. However, due to the fact that each event needs to show it’s venue map, the Google Maps API is being loaded 3 times, on top of the theme’s Google Maps API, therefore only one map is showing up (the first event). Is there a snippet you could give me that I could put in event-map.php (or somewhere else) that only loads the API once per page or something?
Thanks
December 6, 2013 at 6:47 am #80514Barry
MemberHi maze,
Interesting, so this is a custom view you are building? If so please note that we can’t offer a great deal of support for custom development tasks. That said, based on the way you seem to be putting this together, you might be able to leverage a snippet like this.
You would have to be careful however that this doesn’t adversely impact on other default views that ship with The Events Calendar/Events Calendar PRO (if you are using them).
Hope that helps!
December 6, 2013 at 7:08 am #80520maze
ParticipantThanks Barry!
Yes this is a custom view, my client won’t require the full features of Events Calendar from launch, just the basically list view like this but eventually they may integrate more, hence why I’m having to build a custom view. They won’t be using the Events anywhere else on the site so that snippet is great, I don’t get the console error explaining it’s loaded the Maps API 3 times over any more but it still won’t load more than one map.
Appreciate this is technically a custom job though so thank you for helping.
I’ll have to look at a workaround of some sort!
December 6, 2013 at 7:54 am #80528Barry
MemberBecause (it looks like) you are reusing the same admin view file – perhaps by using the tribe_get_embedded_map() function – hence the error, as that view includes the script element used for loading the Google Maps API.
Something like the snippet in my last reply should be a viable way of removing it, though (but you might need to adapt it a little).
January 13, 2014 at 6:35 am #91058Barry
MemberIt’s been a while so I’ll go ahead and close this thread. Of course if you need further help for this or any other issue please do feel free to create a new thread or threads as needed. Thanks!
-
AuthorPosts
- The topic ‘Embedding multiple venue maps’ is closed to new replies.
