22.04.2013 Views

HTML, XHTML & CSS

HTML, XHTML & CSS

HTML, XHTML & CSS

SHOW MORE
SHOW LESS

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

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

Chapter 15: Bring the Best of the Web to Your Web Site<br />

In our initial discussion in this chapter, we explain how you could spend<br />

hours drawing a new map, such as the one we drew of Austin (and a not very<br />

good one at that). We exported that image onto a static Web page using the<br />

element. Visitors to this page saw a crude map of Austin with<br />

zero interactivity, as shown in Figure 15-4.<br />

Figure 15-4: You could use a quick-and-dirty hand-drawn map.<br />

As a more powerful alternative (check out www.dummieshtml.com/examples/<br />

ch15/map-google.html), we can sign up for a Google Maps API key, and<br />

follow the steps in its free tutorial to create a sample map. (For brevity, we’ll<br />

skip those steps here.) After creating the sample map, we can customize the<br />

map’s latitude and longitude for Austin. This is absolutely essential because,<br />

by default, Google pulls up a map from Australia! That’s very much the long<br />

way around for Ed’s party.<br />

Visitors to this page can view four different map versions: a 2D map, a satellite<br />

view, a hybrid map (satellite overlaid with 2D), or terrain views of Austin.<br />

They can also use the map interface to pan left, right, up, or down, as well<br />

as zoom in or out to whatever level of detail they like (from the tiniest nooks<br />

and crannies to the whole continent).<br />

257

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

Saved successfully!

Ooh no, something went wrong!