more than one marker makes eab_events_map break

Why eab_events_map breaks:

I had an issue which was confounding in another thread (https://premium.wpmudev.org/forums/topic/so-i-have-google-maps-installed-and-am-using-it-with) - I am not re-opening it because the issue is solved, but I need to report a bug.

If you add more than one marker to a map in an event - then
[eab_events_map]
will no longer work. I have tested and deleting additional markers in a map so there is only one, will restore the shortcode to functionality.

Hope this helps anyone with the problem, and that it's not too hard of a fix to make this work.

I did extensive testing to make sure this was for sure the problem at both http://events.indyfestusa.com/go-local/ and an additional test site separate from it, and adding a second marker to a map makes the map code stop, removing it makes it come back. Everything else checks out as fully operational and solid.

  • Vladislav

    Hello,

    This is actually the default behavior. The maps with multiple markers are automatically rejected from displaying by default, because the primary location can't reliably be figured out. This is important, because we're overriding the primary location's marker title and content in order to link it up to your event. So, with no way of figuring out which of the markers is the primary location, consequently, we can't reliably determine which marker content to override with the event data. However, if you really do need this feature, try the attached Beta. The old behavior I just explained is still the default one, but you can allow multiple markers support with the new "allow_multiple_markers" shortcode attribute. So, with this in place, your shortcode might now look a bit like this:

    [eab_events_map allow_multiple_markers="yes"]

    Can you please give it a go and see if it helps?

  • AIPman1

    Ok, great! That gets the map to show, and it's related markers. I did notice that only one of the markers then carries a link to the event it is related to...would there be a way to make sure all the markers did? conversely, if the events map can only assign a link to the event to one marker, can it then show only that marker? It looks like it assigned the link to the first marker made, so as long as we know it will only show that first marker on the map that shows all events, we can plan to enter the most important place of the event first, then any others would only show on the actual event map for that specific event, which is fine.

    Just trying to avoid the situation of having markers on a map that have no event attached which could confuse site visitors looking for local things to do.

    Thanks for the work so far on this, and the explanation of the default behavior...

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.