Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I configure the Google Maps api to show a white Google logo instead of the default version?

this:

enter image description here

to this:

enter image description here

Is there an API setting to achieve this?

like image 974
bob_cobb Avatar asked Mar 05 '23 20:03

bob_cobb


2 Answers

Setting any style will turn the logo to white.

That is apparently a design feature from Google to have a more neutral logo aspect (probably in case you change the map colors, it won't "conflict" with your color scheme).

I am not aware of any documented way to specifically set the logo color, but according to this issue (read the 2 comments from the Google assignee) you will get a white logo if you set styles, even to default.

Apparently, just passing an empty styles array works:

var style = [{
  "stylers": [{ 
  }]
}];
like image 54
MrUpsidown Avatar answered Apr 27 '23 08:04

MrUpsidown


I'm really unsure why, but adding this to the map's styles (and passed through defaultOptions) seems to make the logo white:

      styles: [
        {
          featureType: 'poi',
          elementType: 'labels.icon',
          stylers: [
            {
              visibility: 'off'
            }
          ]
        }
      ]
like image 22
bob_cobb Avatar answered Apr 27 '23 10:04

bob_cobb