Google maps replaces ionic font


#1

Hi there,

It seems that including google maps in an ionic app replaces it’s font. As an example, check out the change in the header when you click the map button:

Any idea of how to prevent this from happening? There seems to be a stack overflow question about it, but I couldn’t seem to make the solution work.

Any help would be appreciated. Cheers!


#2

Having the same problem here!


#3

This worked for me, just place it before the map loading code:


#4

Ouch, replacing the insertBefore sure is nasty, but this is the only real solution I’ve seen so far. Kudos!


#5

You may force font like this:

body, .ionic-body  {
    font-family: sans-serif !important;    /* HACK! google maps downloads  roboto font and blinks the view */
}

see http://stackoverflow.com/questions/24323159/google-maps-api-changes-my-font-family


#6

I had seen that link before, but the fix didn’t seem to work for me then. This works nicely, thanks!