In June of 2008, while this book was being written, the Google Maps API celebrated its third birthday. In Internet terms, three is a respectable age, and the Maps API is visibly maturing. It's quite common now to find Google's excellent maps embedded in sites all over the Web; accordingly, Google Maps "expertise" is becoming more common.
With this ubiquity, however, comes a certain danger of mediocrity. The question is no longer just, "Can I put a Google map on my website?" Instead, there's now sufficient maturity in the field that the question should be, "How can I put the best possible Google map on my site?" There are a lot of ways to answer that question, involving considerations of good web design techniques, usability, coding best practices, and standards compliance. One of the major goals for this book is to put those kinds of answers in your hands, in ways that you can immediately use.
In fact, the last item on that list, standards compliance, is itself a big reason for writing this book. The existence of (and adherence to) geodata-publishing standards like KML and GeoRSS enables the rich world of map mashups, and by extension, the emerging geographic Web. It's a powerful and exciting movement, one that Google's mapping initiatives are supporting more and more strongly, and it's not one that's well covered in any other book.
Finally, as the API matures, I believe that the time has come to make it more accessible to nonprogrammers; that's the primary goal for this book, its real reason for being. Although some coding is unavoidable—the "P" in API stands for Programming, after all—the web-based nature of Google Maps means that it is fundamentally within the reach of anyone with some experience building web sites. But until now, all the Maps API books have been written for an audience of developers. There have been scattered tutorials and examples online, but no complete, coherent guide for beginners. So I wrote one: the book you're now holding.
Accordingly, you don't need a programming or development background to benefit from this book. What you do need is a bit of grounding in web page design and construction. That's not to say that you need vast professional experience in these areas, simply that you're not completely put off by talk of XHTML and JavaScript.
Since all Google maps reside on web pages, you need to be comfortable with the basics of XHTML and CSS, at least enough to recognize what's going on inside a page. I'll be giving you complete code in my examples, but if you're going to integrate the concepts into your own pages, you'll need some idea of what goes where.
And because the native language of Google Maps is JavaScript, it would also be beneficial if you have seen JavaScript before, even at the level of occasional event handlers in a web page. If not, you'll find a JavaScript primer in Appendix B to help you over the rough spots.
In addition, you'll need to be familiar with the basics of web publishing, such as how to edit XHTML source files, view them in a browser, and upload them to a web server. Finally, you need to be comfortable with URLs and their structure.
On the other hand, I'm not saying that any programming experience you may have will be wasted, or that this isn't the book for you more seasoned developers. There's no getting away from the fact that Google Maps mashups involve some programming, so there's no doubt that some development background will be helpful; the more you have, the faster you'll progress.
In particular, this book will be a good fit if you have some non-web (or non-JavaScript) development experience, perhaps with another programming language or on another platform. Once you become familiar with JavaScript, you'll find that the code herein is quite elementary, and you'll be up and running in no time.
But to reiterate, programming experience is not required.
This book covers the use of Google's two major web mapping tools, the Maps and Mapplets APIs, with a particular focus on their use with the KML and GeoRSS dialects of geoXML. So the first two parts of the book each cover the use of one of these APIs, from fundamentals through fully functional examples. Then the third part brings it all together with more advanced, real-world code spanning both APIs.
maps.google.com
.satellitefriendly.com
, a real web site successfully using geodata to drive Google Maps.All of the code in numbered listings throughout this book can be found on the book's web site, http://sterlingudell.com/bgmm
. It is also available in zip file format in the Downloads section of the Apress web site (apress.com
).
If you have any comments or additional questions relating to this book, I'd love to hear from you! Full contact information can be found on sterlingudell.com
, or you can e-mail me directly at [email protected]
.
18.117.9.138