Hacking Google Maps and Google Earth (ExtremeTech)

(Dana P.) #1

208 Part III — Google Map Hacks


FIGURE11-1: Restaurants in Ambleside.

The problem with the display is that the user only knows the markers represent restaurants
because the text description tells them so. If you want to show the locations of different types
of information, this can quickly become confusing. The output needs to be updated, first by
supporting more types of businesses or items highlighted on the map, and then you need a way
of highlighting the different types. For the latter, the custom icon techniques in the previous
chapter are used.

Adding More Data to the Output


In Chapter 9, only restaurants were included in the output, and the information for each
restaurant was hand-coded into the database that was used to extract the information. To get
the large volume of information that would need to be inserted into a community database, you
need a more automated solution.

To achieve this, you can use a modified version of the Google Maps script that was covered in
Chapter 6 and is shown in the following code. The script works on the same basic premise, but
searches for a list of entities, extracts the information returned by the Google Local service, and
Free download pdf