[Pro] Map view showing only 3 events

Home Forums Calendar Products Events Calendar PRO [Pro] Map view showing only 3 events

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1070849
    Yan
    Participant

    Hi,

    I have about 100 events in my database, all in the future.

    When using MAP VIEW, the maps zoom to a particular country (I think it’s Romania) and shows only 3 events in this area.

    I would like to have a map which shows all the events, how to do it?

    Thanks

    #1071023
    Brook
    Participant

    Howdy Yan,

    Thank you for reaching out. We would love to help you find a solution if possible. Could you share a link to your website so I can view the problem in action?

    Cheers!

    – Brook

    #1071035
    Yan
    Participant

    Sure.
    Map View: http://hash.events/events/map/
    List view (many events) http://hash.events/events/liste/

    #1071216
    Brook
    Participant

    Thank you Yan for sharing that, it helped clarify what’s up.

    I first of all want to explain how that map works. That map shows markers for any event in the list underneath it. In this case you have 4 events, and 4 markers. It then centers on the middle point between all those events and zooms out far enough that all 4 markers are visible. If you add another event across the world, it will zoom out to include it as well and recenter. Once some of the current events have transpired and are thus no longer on the upcoming list, it will zoom in to the remaining events…

    If you want you can override this dynamic behavior, you can do so by using the WP Filter ‘tribe_events_pro_localize_script’. The $data variable that it filters contains an array, and inside of that array is the key ‘geocenter’ which contains yet another array. It will look something like this:

    {"geocenter":{"max_lat":51.613865,"max_lng":19.472247,"min_lat":44.847726,"min_lng":5.126614}}

    The map will use center between those 4 coordinates, and zoom out far enough to make sure they’re all visible. So you can modify them to zoom in/out, and recenter manually.

    Does that all make sense? Will that work for you? Please let me know.

    Cheers!

    – Brook

    #1071218
    Yan
    Participant

    Hi, Thanks for the answer!

    The problem I’m having is that under the map there is only 4 events displayed as there should be many more. I can’t figure out why, because when I switch to list view all the events are there!

    In brief, is there a filter applied to the map view? Why is it only showing 4 events?

    Thanks 😉

    #1072926
    Brook
    Participant

    That is interesting. Thanks for clarifying Yan. I can see that you have multiple upcoming events in List View with valid addresses. They should be appearing in Map view as well.

    Could you try a little debugging? Could you

    1. go to this event: http://hash.events/event/caprices-festival-2016/
    2. Click Edit Event
    3. Scroll down to the Venue, and click Edit Venue:
    4. Check the box “Use latitude + longitude”.
    5. Could you copy/paste the lat/long values here for me, or are they perhaps blank?
    6. Click Update to save the venue

    Cheers!

    – Brook

    #1083410
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘[Pro] Map view showing only 3 events’ is closed to new replies.