Fix Google Maps JavaScript API controls

So you've implemented the Google Maps JavaScript API (V3) in your site but when you run the site the controls look hidden, broken, stretched...

google maps hidden controls

The fix is quite simple. Add the following snippet where #map-canvas is your Google Maps container.

#map-canvas img{ max-width: none; }
Code language: CSS (css)

Now the controls will magically appear:

google maps fixed controls

About Ricard Torres

Senior Front-end Software Engineer at Netcentric, from Barcelona, Haidong Gumdo Instructor (korean martial art of the sword), street photographer, travel lover, TV addict, Boston Red Sox fan, and privacy advocate.

@ricard_dev @ricard_dev

📝 Blog 🎙 Podcast

Leave a Reply

Add <code> Some Code </code> if you need to.