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 10 ■ LOCATION, LOCATION, LOCATION<br />

}<br />

}<br />

});<br />

// Adding the content to the InfoWindow<br />

infowindow.setContent(content);<br />

// Opening the InfoWindow<br />

infowindow.open(map, marker);<br />

Now you have a working example. If you try it and look for an address, it will put a marker on the<br />

map at its location, accompanied by an InfoWindow that indicates the name of the place and its<br />

coordinates (Figure 10-2).<br />

Figure 10-2. The result you get when searching for Boston<br />

220

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

Saved successfully!

Ooh no, something went wrong!