O.k. I figured out the single page layout. So, just stuck on the first question.
Yup, there’s no shortcode for that, but you can provide a custom template to include that (and using the available functions).
As for 1. It should be possible – not sure how though. First you need to listen for when the user clicks the link, and from that determine (by venue ID) which venue it was. You may do this by including the venue ID as a data attribute.
Then find the venue on the map and zoom into it.
Now the venues are stored in EOAjax.map.location javascript variable, unfortunately that only stores latitude/longtitude and tooltip content. In later versions I’ll probably add the venue ID.
…So on seconds thoughts, include the venue lat/lng co-ordinates instead of the ID and use that to zoom :).
Oh my, Stephen I am the ultimate newb… I’m so glad you got back to me, but the above is like a completely different language to me.
Is there any way you could post the code I would need to use and tell me which page and where to pop it in?
Cheers Stephen
I do understand what lat long coordinates are though! 🙂
Hi Stephen,
Did you happen to add the venue id, so that you can create text that links and zooms into the map location? Otherwise, is there a particular string I could use to accomplish the above?
Thanks
Lara
On a page with a map on it the venue details are stored at eventorganiser.map[0].locations.
Keep in mind if have multiple maps on the page it could be eventorganiser.map[1].locations, eventorganiser.map[2].locations etc.
eventorganiser.map[0].locations is an array of JS objects of the form:
{
"venue_id":80,
"lat":"38.320610",
"lng":"-108.895500",
"tooltipContent": "...Tooltip content....
"icon":null
}
E.g. eventorganiser.map[0].locations[0].venue_id gets the venue ID of the first venue on the map.
So following above, let’s assume you have the HTML mark-up:
<a href="#" class="venue-map-link" data-venue_id="4"> Venue A </a>
Listen for a click on .venue-map-link and get the venue ID from it, then search for the venue in the array eventorganiser.map[0].locations, and get the lat/lng co-ordinates from that. Then you can zoom
I realise that leaves a lot of details for you to fill to in but hopefully that will point you in the right direction…