Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

64 Part I — Basics


Wrapping Up


In this chapter you have seen how to extract data from the Google search database that could
be used and combined with geographical information to extend the data that you provide
within your Google Maps applications.

Although a lot of the information added to a Google Maps application will probably come
from other personal sources, such as census data or photos that you have taken, you may also
want to integrate some of the data contained in the rest of the Google Web database.

Understandably, usage of the Google Web API has its limitations. You can only obtain 1,000
items each day, and retrieving all 1,000 from a single set of criteria requires a number of web
accesses. But if you are willing to work within these limits, you can glean an amazing amount
of information to use in your own applications.

Combining Offline and Online Information

The Google database allows you to extract information about businesses or locations that may
be relevant to the Google Map you are creating.

However, you will likely want to combine information from your Google search with “offline”
data. For example, you might want to combine a list of businesses you’ve already composed
with the search information related to those businesses you’ve gleaned from the Google
database.

Although how you merge this information is implementation- and data-specific (see the exam-
ples throughout the rest of this book), the best way to merge online and offline information is
to relate data directly through an identifiable key such as the name, URL, or address.

For example, if you have a list of companies and their URLs, you can use the URL data you have
on file (offline) with the Google search results and use the URL as the key between the online
and offline source.

Another alternative is to incorporate the search string for a given business into the offline data,
and then use this as the basis for a related search through the Google engine.

Be aware, though, that there is a limit to what you can sensibly merge together without the
availability of a specific piece of key data. For example, having an offline list of plumbers for a
particular city and combining it with an online search will not work if you have no way to merge
the data together.
Free download pdf