Custom GMapTypeControl buttons (Google Maps V2 API)
        Posted  
        
            by 
                AndiDog
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by AndiDog
        
        
        
        Published on 2010-12-25T19:49:42Z
        Indexed on 
            2010/12/25
            19:54 UTC
        
        
        Read the original article
        Hit count: 218
        
google-maps
|google-maps-api-2
A similar question was already asked, but does not have a satisfying answer.
I want to change the CSS style for the map type selection buttons (which are actually DIVs that don't have a CSS class). The links in the referenced question show how to subclass controls, but the examples don't seem to work for GMapTypeControl. Tried the following
function CustomGMapTypeControl() {}
CustomGMapTypeControl.prototype = new GMapTypeControl()
CustomGMapTypeControl.prototype.setButtonStyle_ = function(button) {
    button.style.backgroundColor = "red";
}
but the setButtonStyle_ function doesn't even get called.
Any solutions for this?
© Stack Overflow or respective owner