Home › Forums › Calendar Products › Events Calendar PRO › [Pro] Map view showing only 3 events
- This topic has 6 replies, 3 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
February 10, 2016 at 6:39 am #1070849
Yan
ParticipantHi,
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
February 10, 2016 at 12:17 pm #1071023Brook
ParticipantHowdy 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
February 10, 2016 at 12:29 pm #1071035Yan
ParticipantSure.
Map View: http://hash.events/events/map/
List view (many events) http://hash.events/events/liste/February 11, 2016 at 2:31 am #1071216Brook
ParticipantThank 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
February 11, 2016 at 2:35 am #1071218Yan
ParticipantHi, 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 😉
February 14, 2016 at 7:06 pm #1072926Brook
ParticipantThat 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
- go to this event: http://hash.events/event/caprices-festival-2016/
- Click Edit Event
- Scroll down to the Venue, and click Edit Venue:
- Check the box “Use latitude + longitude”.
- Could you copy/paste the lat/long values here for me, or are they perhaps blank?
- Click Update to save the venue
Cheers!
– Brook
February 29, 2016 at 8:35 am #1083410Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘[Pro] Map view showing only 3 events’ is closed to new replies.
