Google Maps API Tutorial

© 2006, 2007, 2008, 2009 Mike Williams

Translate this page:


Toned map

You can change the colour tone of a map by making the tile layers partially transparent and applying a background colour underneath them.

To make the tile layers partially transparent, overwrite their .getOpacity() method with one that returns a value less than 1.0 before creating the map.

To set the background colour, apply a .style.backgroundColor after creating the map. If you apply the colour before creating the map, the API will change it back.

Here's an example


The getOpacity() setting is ignored by MSIE on the upper layer of the hybrid map. That's because the AlphaImageLoader used by MSIE for partially transparent PNG images doesn't support opacity control.

Back to Mike's Homepage
Up to the start of this tutorial