Is it possible to have different map zoom levels manually set for each venue?

Home Forums Calendar Products Events Calendar PRO Is it possible to have different map zoom levels manually set for each venue?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #50903
    Mike
    Participant

    I would like to manually set the google map zoom levels on each venue’s page. Is this possible, and if so, how?

    Thanks for the help!

    #50973
    Jonah
    Participant

    Hi Mike,

    It’s possible but it’s going to be a bit tricky. Here’s what you need to do:

    1. Make a copy of /wp-content/plugins/events-calendar-pro/views/single-venue.php and place in an ‘events’ folder of your active theme.

    2. Change the ‘tribe_get_embedded_map’ function on line 17 to ‘custom_tribe_get_embedded_map’.

    3. Next place this new ‘custom_tribe_get_embedded_map’ function in your theme’s functions.php file: http://snippi.com/s/2rcuksx – notice on line 40 it calls to a new map view file which we’re going to create and add some custom code to.

    4. Create an ‘includes’ folder in your theme and inside it create a file ‘custom-map-view.php’ and paste in this code: http://snippi.com/s/rl32det – here on line 17 I start a conditional statement that checks for a specific venue ID and sets the zoom level accordingly. You can add as many additional conditions here as you want for other venues. Just remember to get the proper ID’s

    This is not the most ideal method but it definitely works. I hope this help but let me know if you have any questions!

    – Jonah

Viewing 2 posts - 1 through 2 (of 2 total)
  • The topic ‘Is it possible to have different map zoom levels manually set for each venue?’ is closed to new replies.