Map View – No Location

Home Forums Calendar Products Events Calendar PRO Map View – No Location

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1508158
    amycarolyn
    Participant

    I understand that Map View, by design, only shows events with an address. My client wants to use the Map View for the main view but wants all events to show even if there is no address. Is there a function/filter I can use to modify the Map View to do this?

    #1509631
    Andras
    Keymaster

    Hi amycarolyn,

    Thanks for getting in touch with us!

    This essentially looks like a custom development task and so is outside of our stated scope of support.

    With that being said, we’d love to help point you in the right direction.

    It looks like that the query that runs on the map view would need to be adjusted.

     

    We do need to prioritize support requests from other customers at this time but I’ll certainly flag this with the team and – although we can’t make any promises – if we have time and space to come back and help, we’ll be happy to do so.  Please let us know if you’d like to go this route so that you can be added to this queue.

    In the meantime, if there is any more information you can share (including mocks) that will help us to better understand what you are seeking please do feel free to add them to this ticket.

    If you urgently need help with this, however, you may instead wish to consider working with a suitably skilled developer or designer who can offer the additional level of support you require.

    Thanks and cheers,
    Andras

    #1513324
    amycarolyn
    Participant

    I am a developer I was just hoping you had the correction function on hand or could point me to the right part of the documentation as I’m having trouble finding information on it.

    #1513326
    amycarolyn
    Participant

    I found a solution in a different support ticket where the Event view is modified with a function. It looks like that person received help for a similar question so can you confirm you can’t help me? I do have a Pro license (and we’ve purchased a Community license as well under my client’s account).

    //*Show All Events in Map View
    add_action( ‘tribe_events_pre_get_posts’, ‘unlimit_map_view’ );
    function unlimit_map_view( $query ) {
    if ( defined( ‘DOING_AJAX’ ) && DOING_AJAX && $query->get(‘eventDisplay’) == ‘map’ ) {
    $query->set(‘posts_per_page’, ‘-1’);
    }
    return $query;
    }

    I’m thinking I can use this to pull events that don’t have a location attached but since I don’t know how it’s being queried to begin with I’m not sure how to override it. Do you know which file contains the query? I haven’t found it yet.

    #1513773
    Barry
    Member

    Hi Amy!

    We always try to help where we can, even for custom dev requests such as this one – you’ll certainly see lots of examples of us doing so throughout the forums – but technically questions like this lie outside our stated scope of support. What we’ve started to do in these situations is add requests like yours to a queue of similar questions and if time and space opens up for us to review and help, we will follow up as I am doing now. I hope that clarifies our policy about these things 🙂

    As I understand your question, you still wish map view to contain a map, but you want the list of events below the map to include all events including those which are not assigned to venues or which are assigned to venues but where the venues themselves do not have any geodata that would allow us to position a pin on the map. That being the case, the following snippet may be helpful:

    https://gist.github.com/barryhughes/ab991dcf98bfe13125266c9b25fcafa7

    This could be added either to a custom plugin (preferred) or else your theme’s functions.php file may work, though we don’t generally recommend this.

    Does that meet your needs here?

    #1513795
    amycarolyn
    Participant

    Yes, this is perfect and works great. Thank you! Have a nice day.

    #1514382
    Barry
    Member

    Awesome, happy to help 🙂

    #1530993
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘Map View – No Location’ is closed to new replies.