Searching for Maps


As the name implies, Google Maps is all about the maps. To display a map of a given location, all you have to do is enter information about that location into the top-of-page search box, shown in Figure 18.1. When you click the Search button, a map of that location is displayed on the page.

Figure 18.1. The Google Maps home page.


Searching by Address

The most obvious way to display a map of a given location is to enter the location's street address or general location. There are a number of ways you can enter an address or a location, as detailed in Table 18.1:

Table 18.1. Google Maps Address Formats

Address Format

Example

city, state

indianapolis, in

zip

46204

address, city, state

101 e washington street, indianapolis, in

address, city, zip

101 e washington street, indianapolis, 46204

street intersection, city, state

e washington and n Pennsylvania, indianapolis, in (can use the & sign instead of the word "and")

street intersection, zip

 e washington and n Pennsylvania, indianapolis, 46204 (can use the & sign instead of the word "and")

latitude, longitude

39.767, -86.156

airport code

LAX

subway station, country (in UK and Japan only)

paddington, uk


Remember to put a comma after each part of the address. In most instances, you don't need to spell out words like "east," "street," or "drive"; common abbreviations are okay, and you don't need to put a period after the abbreviation.

For many major cities, Google Maps also accepts just the city name. For example, entering miami gives you a map of Miami, Florida; entering san francisco displays a map of the California city. If, on the other hand, you enter a city name that's fairly common (such as greentownwhich appears in Indiana, Ohio, and several other states), Google will either display a map of the largest city with that name, or provide a list of cities or matching businesses for you to choose from.

Caution

You can't enter just a state name or abbreviation. While Google recognizes most cities, it doesn't recognize states or countries.


Tip

You can use any of Google's advanced search operators (discussed in Chapter 2, "Searching the Web") to fine-tune your Google Maps searches.


If you want to enter latitude and longitude, you have two options. First, You can enter latitude and longitude as decimal degrees, using the - sign to express west longitude or south latitude. Second, you can use N, S, E, and W designations. What you can't do is express latitude and longitude using degrees-minutes-seconds (such as 28 24' 23.4"); Google doesn't recognize the ' and " syntax.

If Google doesn't recognize an address you entered (such as when an address could either be on an "east" or a "west" street, or the same address for a "drive" and a "lane"), Google will display a list of possible addresses, as shown in Figure 18.2. Assuming you can identify the correct address from this list, click the link to display the map of that location.

Figure 18.2. Google Maps sometimes asks for an address clarification.


Searching by Landmark

Sometimes you don't need to know the exact address to generate a Google map. Google has hard-coded many landmarks and institutions into its map database, so that you only have to enter the name of the landmark or location into the search box.

For example, entering golden gate bridge generates the map shown in Figure 18.3; entering fenway park generates the map shown in Figure 18.4.

Figure 18.3. Golden Gate Bridge on a Google map.


Figure 18.4. Fenway Park on a Google map.


Displaying Google Maps by Entering a URL

As you learned back in Chapter 2, any time you enter a Google search, the resulting page is identified by a unique URL. This URL contains the keywords in the query, as well as parameters that define how the results are displayed.

Google uses this same approach to generate its map URLs. If you know the parameters that Google uses to create certain types of maps, you can create your own map URLs, and enter these URLs directly into the address box of your web browser.

Caution

What landmarks are and are not in the Google Maps database is somewhat arbitrary. It's always worth trying, but don't be disappointed if what you're looking for isn't so easily found.


Now, this might seem like a lot of work for something that Google does automatically, but manually entering a map URL has certain benefits. The chief benefit is that you can use this technique to generate maps from your own custom data. Let's say, for example, that you have a spreadsheet of your co-workers' names and addresses. If you want to generate maps of your colleagues' locations, you can use the URL manipulation technique to create the map URLs, thus bypassing the standard data entry process.

The key to doing this, of course, is understanding the components of Google's map URL. While these URLs might look complex at first glance, they're actually fairly straightforward.

Let's look at a typical map URL:

 maps.google.com/maps?q=minneapolis,mn&hl=en 


Dissecting this URL, we see that the first part of the address (maps.google.com/maps) gets us to the Google map server. The next bit (?q=) specifies the start of the query. Next comes the location entered (minneapolis,mn), in this example in the form of city,state. Finally, the whole thing ends with a &hl=en parameter, which tells Google to display the map in English.

The real trick here is inserting the location after the ?q= and before the &hl=en parameters. You want to enter the location exactly as you would in the Google Maps search box, with the stipulation that you replace every space in the location with a + sign. So, for example, if you wanted to display a map of New York City, you'd enter new+york,ny; if you wanted a map of Apple Valley, Minnesota, you'd enter apple+valley,mn.

The same thing goes with full street addresses. Enter the address as you would normally, but with + signs in place of any and all spaces in the address. Take, for example, the following address: 101 E Washington Street, Indianapolis, 46204. When you convert this into URL format, the full address looks like this:

 maps.google.com/maps?q=101+e+washington+street,+indianapolis,+46204 


You can also use additional parameters to further dictate what type of map is displayed:

  • &t=x.Defines the imagery type. Replace x with k to display a satellite map, or h to display a hybrid map.

  • &ll=x,y.Displays a map centered on a specific latitude (x) and longitude (y).

  • &spn=x,y.Defines the size of the map area, in degrees latitude (x) and longitude (y).

  • &z=x.Also defines the map area in terms of level of zoom. Replace x with a number between 3 (maximum zoom in) to 12 (maximum zoom out).

Like I said, it looks complicated, but it's really quite simple.

Displaying Street Maps from a Google Web Search

Here's another tip. You don't have to go to the Google Maps page to display a Google map. When you enter a street address, city, and state (or ZIP Code) into the standard Google web search box, the OneBox listing search results page will be a Show Map listing like the one in Figure 18.5. This listing includes a link to the location's map on Google Maps, Yahoo! Maps, and MapQuest. Click the desired link to display the associated map full-size.

Figure 18.5. Map results from the standard Google search page.





Googlepedia. The Ultimate Google Resource
Googlepedia: The Ultimate Google Resource
ISBN: 078973639X
EAN: 2147483647
Year: 2004
Pages: 370

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net