{"id":75480,"date":"2013-11-09T06:52:19","date_gmt":"2013-11-09T14:52:19","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/"},"modified":"2015-07-07T06:29:38","modified_gmt":"2015-07-07T13:29:38","slug":"extending-information-shown-in-the-google-maps-markers","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/","title":{"rendered":"Extending information shown in the Google Maps markers"},"content":{"rendered":"<p>Hello,<\/p>\n<p>first of all, your plugin does a great job for me, it makes my website project a lot easier. But since I&#8217;m not too deep into this kind of programming, I&#8217;m a little stuck with this problem:<\/p>\n<p>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&#8217;d like to add (at least) the start date (and maybe time) to it. I&#8217;ve already worked my way to this:<\/p>\n<p>1) In tribe-geoloc.class.php, I found the function &#8220;generate_markers&#8221; and added a new var to the $markers array, which is designated like this:<\/p>\n<p>$date     = tribe_get_start_date( $event-&gt;ID, true, &#8216;n\/j\/Y&#8217; );<\/p>\n<p>2) In tribe-events-ajax-maps.js, I added a new param to $.extend and its function map_add_marker:<\/p>\n<p>map_add_marker: function (lat, lng, title, address, link, date)<\/p>\n<p>I also included it to the (already modified) map marker string:<\/p>\n<p>var content = &#8220;<strong>Event name: <\/strong> &#8221; + content_title;<br \/>\ncontent = content + &#8220;&#8221; + &#8220;<strong>Event time: <\/strong> &#8221; + date;<\/p>\n<p>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:<\/p>\n<p>map_add_marker:function(a,e,f,h,k,j)<\/p>\n<p>&#8230;<\/p>\n<p>f=&#8221;<strong>Event name: <\/strong> &#8220;+e;f=f+&#8221;<strong>Event time: <\/strong> &#8220;+j;<\/p>\n<p>The result of all this is that my markers show &#8220;Event time: undefined&#8221;, and I don&#8217;t really get why. I also changed $address from containing the street to containing city and country, and it worked. But most likely there&#8217;s another variable handling routine that I&#8217;ve missed somewhere, and it doesn&#8217;t pass on the newly added $date? I hope you can help me out here.<\/p>\n<p>Best regards,<br \/>\nTobias<\/p>\n","protected":false},"template":"","class_list":["post-75480","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Extending information shown in the Google Maps markers -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Extending information shown in the Google Maps markers -\" \/>\n<meta property=\"og:description\" content=\"Hello, first of all, your plugin does a great job for me, it makes my website project a lot easier. But since I&#8217;m not too deep into this kind of programming, I&#8217;m a little stuck with this problem: Is there a way to extend the information shown in the Google Maps markers? By default, they [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-07T13:29:38+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/\",\"name\":\"Extending information shown in the Google Maps markers -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2013-11-09T14:52:19+00:00\",\"dateModified\":\"2015-07-07T13:29:38+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Extending information shown in the Google Maps markers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Extending information shown in the Google Maps markers -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/","og_locale":"en_US","og_type":"article","og_title":"Extending information shown in the Google Maps markers -","og_description":"Hello, first of all, your plugin does a great job for me, it makes my website project a lot easier. But since I&#8217;m not too deep into this kind of programming, I&#8217;m a little stuck with this problem: Is there a way to extend the information shown in the Google Maps markers? By default, they [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/","article_modified_time":"2015-07-07T13:29:38+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/","name":"Extending information shown in the Google Maps markers -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2013-11-09T14:52:19+00:00","dateModified":"2015-07-07T13:29:38+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/extending-information-shown-in-the-google-maps-markers\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Extending information shown in the Google Maps markers"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/75480","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/75480\/revisions"}],"predecessor-version":[{"id":982029,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/75480\/revisions\/982029"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=75480"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}