Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

Storing and Sharing


Information


G


oogle Maps–based applications are rarely completely standalone.
Sure, you can use them to merely embed information into the pages
of your web site, but the power of Google Maps is found in the
additional information and interfaces to the system that you can introduce
by using dynamic components and data.

Most Google Maps applications are made up of a combination of some
basic data embedded into the web page and data that is stored and supplied
through an external interface. A good example of this is the basic Google
Maps interface, which uses information from the Google database to over-
lay information on a Google Map.

The primary focus of this chapter is how to convert, store, and provide the
information that you will ultimately be providing through your Google
Maps applications.

Format Types and Uses


There are many different formats and methods of storing information.
Using the right one for the Google Maps application you are building is
critical to achieving the flexibility and ease of use that are key to the appli-
cation’s functionality.

For some applications, you want as simple a solution as possible to avoid
the complexity of having to read and write files in various formats and keep
them updated. For example, if all you are producing is a simple map of your
organization, producing a static data file that contains the information you
need will probably be more than sufficient.

However, if you want to create and work with more dynamic information
(for example, if you want to create a map of properties for a realtor), you will
probably already be dealing with data extracted from or directly available
within a database. You’ll need to convert and translate this information into
XML for it to be effectively used within your Google Maps application.

̨Storage formats and
uses

̨Parse and use text
files

̨Parse XML with Perl


̨Parse XML with
JavaScript

̨Interface to an
RDBMS

̨Generate XML from
an RDBMS

chapter


in this chapter

Free download pdf