27.10.2014 Views

Google Maps API 3

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 7 ■ INFOWINDOW TIPS AND TRICKS<br />

Figure 7-1. The base map as it will look in <strong>Google</strong> Chrome<br />

Style Sheet<br />

The style sheet provides some basic styling (Listing 7-2). What’s different from the previous examples is<br />

that the map will span the whole page. Worth mentioning is that to make this work across most<br />

browsers, the height must be set to 100 percent for the HTML, body, and map.<br />

Listing 7-2. The CSS<br />

html, body {<br />

height: 100%;<br />

font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;<br />

font-size: small;<br />

margin: 0;<br />

}<br />

#map {<br />

width: 100%;<br />

height: 100%;<br />

}<br />

132

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!