
Chapter 1
Google Maps
The Google Ma ps API, version 2 (http://www.google.com/apis/maps/)
is a great way to dip your toe into the w o rld of web mapping. You
don’t have to w o rry about finding and managing your own data,
installing and configuring your own server, or creating your own
cross-browser AJAX mapping framework from scratch. It’s a pro-
grammer’s dream—with a little bit of JavaScript and a few lati-
tude/longitude points, you are off to the races.
It is, however, aimed squarely at programmers. Yo u will be neck-
deep in JavaScript from the get-go. If all you want is a simple map
without having to program it yourself, there is an easier way: Yahoo!
Maps (htt p://developer.yahoo.net/ maps/) pro vides a simple service
t
hat allows you to pass in an XML list of points and get a fully
rendered map out on the other side. You can give it either lat/long
points or plain old street addresses. Yahoo! handles everything
for you—creating the points on the map, handling pop-up “bubbles”
over your data points, the whole nine yar ds. You can pass in custom
icons, html links, and descriptive text for each item in t he XML. You
get quite a bit of flexibility for a canned application.
The Google Maps A PI gives you the same functionality as Yahoo!
Maps—pop-up bubbles (called Info Windows in Go o gle-speak), cus-
tom icons, and so on—but you have to be much more deeply involved
in the implementation. After all, Google Maps is an API, not a
finished a pplication. You get all of the pieces, but there is “some
assembly required.”
The upside is that you have much more control of your applica-
tion. You have an event model that you can tap into—you can
评论3
最新资源