Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change the font-family of Google Maps labels?

I'm making a custom Google Map, using the official Styled Maps Wizard.

However, it doesn't seem to be possible to change the font-family of the labels (which is Arial).

Does anyone know if this is possible in Google Maps?

like image 487
Richard Avatar asked Nov 28 '12 13:11

Richard


2 Answers

(EDIT: I now see the original question was about native Google Map labels, not custom Marker Labels. For my original response i.e. a custom font-family on Marker Labels, please read on...)

Fast forward to 2018...

If you call the Google Maps API, you can use a custom Google Font. Here is the documentation on font-family.

You‘ll need to specify the fontFamily option of the label option when creating a new google.maps.Marker. I used a font from Google Fonts, eg:

var marker = new google.maps.Marker({
    position: posiiton,
    map: map,
    label: {
        text: 'Label text',
        fontFamily: "'Domine', serif",
    }
});
like image 90
cuka Avatar answered Oct 15 '22 12:10

cuka


The answer is: it can't be done. The best you can do is switch off all Google Maps labels, and use custom overlays.

Alternatively, make your own tiles using a service like Cloudmade or TileMill.

like image 28
Richard Avatar answered Oct 15 '22 11:10

Richard