Home › Forums › Calendar Products › Events Calendar PRO › Extending information shown in the Google Maps markers
- This topic has 3 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
November 9, 2013 at 6:52 am #75480
tobias
ParticipantHello,
first of all, your plugin does a great job for me, it makes my website project a lot easier. But since I’m not too deep into this kind of programming, I’m a little stuck with this problem:
Is there a way to extend the information shown in the Google Maps markers? By default, they show the linked event title and, if there is, its address. I’d like to add (at least) the start date (and maybe time) to it. I’ve already worked my way to this:
1) In tribe-geoloc.class.php, I found the function “generate_markers” and added a new var to the $markers array, which is designated like this:
$date = tribe_get_start_date( $event->ID, true, ‘n/j/Y’ );
2) In tribe-events-ajax-maps.js, I added a new param to $.extend and its function map_add_marker:
map_add_marker: function (lat, lng, title, address, link, date)
I also included it to the (already modified) map marker string:
var content = “Event name: ” + content_title;
content = content + “” + “Event time: ” + date;3) The plugin only seems to use the tribe-events-ajax-maps.min.js (is that correct? Sorry for the newbie question), only changes I made in there became visible:
map_add_marker:function(a,e,f,h,k,j)
…
f=”Event name: “+e;f=f+”Event time: “+j;
The result of all this is that my markers show “Event time: undefined”, and I don’t really get why. I also changed $address from containing the street to containing city and country, and it worked. But most likely there’s another variable handling routine that I’ve missed somewhere, and it doesn’t pass on the newly added $date? I hope you can help me out here.
Best regards,
TobiasNovember 12, 2013 at 1:05 pm #75870Neill
MemberHi Tobias,
This is a good question and quite frankly way over my non-js head 😉
I’m going to get a question in to one of our developers who works specifically with this area of the plugin. I will say that this is a little outside of the realms of support for the plugin – but it maybe an area that would benefit from being mentioned as a feature request. While I see if we can get a developer to point you in the right direction, you could take a look at this URL here: https://tribe.uservoice.com/forums/195723-feature-ideas and log it as a suggestion. If other users think this will be helpful they can vote for it too and we may be able to look into making it a feature without having to go through all this customization.
Thanks for the detailed tobias and your kind words about the support. I’ll get back to you shortly.
Neill
November 15, 2013 at 1:09 pm #76719Neill
MemberHi Tobias,
Thanks for you patience while we look into this. This is what i found out from the developers.
Currently there’s no way to do this that we can suggest. But this has come up as a suggestion by both developers and other users. Our best bet at this point, as we can’t realistically offer a solid way to get this done, is to decide if this can be a feature baked in to our plugin.
One of our developers will be bringing this up as a feature request – so I’ll get back to you as we make a decision on that. Thanks for your info and time in reporting this. I’ll close this ticket out right now, but I’ll update you here once we have more news which should be shortly.
Thanks tobias
Neill
July 7, 2015 at 6:29 am #982028Support 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 ‘Extending information shown in the Google Maps markers’ is closed to new replies.
