google-maps-api-3jquery-gmap3

How to change Google logo's href


I would like to change the “Click to see this area on Google Maps” link, but I can't select the proper a tag.

Thanks


Solution

  • You can take advantage of RobH's answer

    var anchors = document.getElementsByTagName('a'),
        l = anchors.length,
        i,
        a;
    
    for (i = 0; i < l; i++) {
        a = anchors[i];
        if (a.href.indexOf('maps.google.com/maps?') !== -1) {
             // here you can manipulate the anchor
             a.title = ''; 
             a.onclick = function () { return false; };
        }
    }
    

    NOTE

    Remember It's against the Google Maps API ToS to remove the Google branding or the ToS link.