Where am I? Where are you?

Today, we're going to cover the very basics of the Google Maps API which, like most of the other Google APIs I've been playing with, is very full-featured and easy to use.

I'll show the basic code to embed a map on a web page and place a marker at a specific address.

Map of Washington, DC

The first thing to do is add the appropriate script tags to the <head> tags of your page.

~~~~ {.html name="code"} wzxhzdk:0

Here's the html of the <div> where the map content gets placed.

~~~~ {.html name="code"}

Loading...
wzxhzdk:1

This page shows the above in action by letting the user enter an address and place a marker on the map for that address.

~~~~ {.javascript name="code"} Where am I? Where are you?

Loading...

~~~~