{"id":166,"date":"2007-02-22T17:41:26","date_gmt":"2007-02-22T15:41:26","guid":{"rendered":"http:\/\/oelna.de\/blog\/?p=166"},"modified":"2008-03-31T15:19:46","modified_gmt":"2008-03-31T13:19:46","slug":"hide-the-google-logo-in-google-maps","status":"publish","type":"post","link":"https:\/\/oelna.de\/blog\/166","title":{"rendered":"Hide the Google Logo in Google Maps"},"content":{"rendered":"<p>Before you read any further: This is not allowed by <a href=\"http:\/\/www.google.com\/apis\/maps\/terms.html\">Google&#8217;s Terms of use<\/a>. It&#8217;s a little hack that I wrote during my efforts to get to know <a href=\"\">Google Maps<\/a>. I was trying to access the single html elements inside the map container and came across the elements containing the Google Logo and the <a href=\"http:\/\/www.google.com\/apis\/maps\/terms.html\">Terms of use<\/a> link, that are placed over the map. Changing the CSS styles was no big deal and I guess you can use this for something good too, let&#8217;s say for changing the zoom control&#8217;s position, etc.<br \/>\nnow here is what i came up with (no magic, really):<\/p>\n<p><code><br \/>\nfunction toggle_logo() {<br \/>\n\tvar source = document.getElementById('map');<\/p>\n<p>\t\/\/Terms of use link<br \/>\n\tvar divs = source.getElementsByTagName('div');<br \/>\n\tvar current = (divs[14].style.display == 'none') ? 'block' : 'none';<br \/>\n\tdivs[14].style.display = current;<\/p>\n<p>\t\/\/Google Logo link<br \/>\n\tvar links = source.getElementsByTagName('a');<br \/>\n\tvar current = (links[1].style.display == 'none') ? 'block' : 'none';<br \/>\n\tlinks[1].style.display = current;<br \/>\n}<br \/>\n<\/code><\/p>\n<p>Remember that you are not actually allowed to remove these elements from the map. I wrote this as an example of how you can access the single elements and as a training exercise for myself. Google usually <a href=\"http:\/\/www.chillingeffects.org\/fairuse\/notice.cgi?NoticeID=2127\">doesn&#8217;t let you mess around<\/a> with their stuff. So <a href=\"http:\/\/en.wikipedia.org\/wiki\/Don't_Be_Evil\">don&#8217;t be evil<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Before you read any further: This is not allowed by Google&#8217;s Terms of use. It&#8217;s a little hack that I wrote during my efforts to get to know Google Maps. I was trying to access the single html elements inside the map container and came across the elements containing the Google Logo and the Terms [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"activitypub_content_warning":"","activitypub_content_visibility":"","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"anyone","activitypub_status":"","footnotes":""},"categories":[3,1],"tags":[220,61,231,167,22,60,30,176],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-english","category-general","tag-google-maps","tag-coding","tag-google","tag-hack","tag-javascript","tag-nerd","tag-studium","tag-web-20"],"_links":{"self":[{"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oelna.de\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}