Custom GMapTypeControl buttons (Google Maps V2 API)
- by AndiDog
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?