Style examples

Here are some examples of complex element styling.

Yellow roads with green outlines

Customize all roads to have a pale yellow fill and a dark green outline as thebase style.A custom-styled map, showing several roads. The roads are pale yellow with a green outline.

  1. UnderMap Features, selectRoad Network.

  2. In theRoad Network style panel, underPolyline, select the boxunderFill color.

  3. Select a light yellow color, such as hex code #eeeec8.

  4. Select the box underStroke color and select a dark green color, suchas hex code #155304.

  5. UnderStroke width, set it to 3px.

As you zoom in and out, different roads show this style as they appear anddisappear. Once roads get too small to show the outline, they display only theyellow color.

Different colors of water by zoom level

Some types of element styling might only be visible at certain zoom levels, like3D buildings or points of interest (POIs). Add a style such that thewater appears dark blue zoomed out to maximum (z0),medium blue when zoomed in to the level of a state or province (zoom level 6on a laptop), and pale blue with a dark blue border when zoomed in tightly(z19).

Two screenshots of a custom-styled map. The left side shows land surrounded by medium-dark blue water. The right side shows the same area on the map, zoomed in one level. The water is slightly lighter blue than the map on the left.

  1. UnderMap Features, selectWater.

  2. In theWater panel, underPolyline, select the boxunderFill color, and select a dark blue color.

  3. Select the zoom diamond to the right ofFill color to open thekeyzoom panel.

  4. Select zoom level 6, and select a medium blue color.

  5. Select zoom level 19, and change the water to light blue.

Note, if you set a stroke color, creeks and streams and many smaller riversonly show the body color, even zoomed all the way in. The difference betweenstroke and fill is visible on large ponds, lakes, and larger bodies of water.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-01 UTC.