Inc. ® 2007 by Yahoo!

Yahoo geocoding Examples

Since the major search engines have opened up their mapping tools to programmers, geocoding has become an essential step in the process of building many a mashup.

Geocoding is the process of converting human-readable place data — a city name, ZIP code, or address — to latitude and longitude points that can be easily plotted on a map.

Yahoo’s HTTP Geocoder API is easy to use, and its output is easy to incorporate into your applications. This article will describe its features and show some examples of how to access the results.

What You’ll Need

  • Basic knowledge of XML
  • A Yahoo account
  • To incorporate results with an application, you’ll need some programming skills. I’ll be showing code examples in PHP.

Step 1: Start a Search

Yahoo provides several options to search for a location, such as specifying an address and city separately.

For example, here’s the address for Wired.com, the home of Webmonkey:

520 3rd Street San Francisco, CA

Breaking this into pieces for the geocoder, we get:

street: 520 3rd Street city: San Francisco state: CA

The HTTP geocoder uses a simple URL. All we have to do is pass these pieces to the geocoder with the correct parameter. Here’s the URL we can use for the Webmonkey address (remember to include your Application ID):

Tip: Sometimes we may be geocoding an address that comes from a user. In that case, we don’t always know where the street name ends and the city name begins. The Yahoo API provides a useful option of passing along everything as one parameter and letting the geocoder figure out which part is which. We’ll do that here, using the location parameter:

Both of these URLs return the exact same results. That geocoder is smart!

Step 2: View the Results

When we searched for the Webmonkey offices, we received a whole bunch of XML that looks like this:

-122.395528

520 3rd St
San Francisco CA US

In XML, pieces of data are wrapped in tags that look a lot like HTML. The first thing you may notice is that the geocoder separated the pieces of the address for us. Now we have the address, city, and state, with each piece clearly marked.

You might also like
Android No-Permissions Reverse Shell
Android No-Permissions Reverse Shell
How to create a simple Google Map app in Android
How to create a simple Google Map app in Android
Barcamp Bangalore 13: Reverse Engineering an Android app
Barcamp Bangalore 13: Reverse Engineering an Android app ...

Doyle Park...just up the street from my

by bikeriderdude

Office on Sonoma Avenue (towards Farmer's Lane).
Be great if you can bring a kid. We'll talk before then, but I'm pretty sure I can get my whole family to come.

7 Game of Thrones Apps That Will Get You Through the Much-awaited Winter  — Gizmodo India
.. or Winterfell, you get a dialog box, which asks you to buy more maps. Unfortunately, you can't dismiss the dialogue box, leading to the obstruction of the cartography. ..

Flagstaff's rocky lava field became a little piece of the moon  — azcentral
If American know-how could put a man on the moon, the man should bring back rocks to study. The government agreed, and in 1963, the .. Volcanoes were chosen because of the moon's volcanic history, the test site for its impact craters.

Germany gpsticker2
Mobile Application (Germany)
  • Map download manager
  • Import/export routes as Google Earth KML- and GPX-files.
  • Route calculation
  • Display of GPS data integrated into the map view
  • Search for hotels, restaurants and other pois
  • Reverse geocoder
  • Charts for elevation and velocity
  • Search for addresses
  • Display weather conditions
  • Route replay

Missing in Alaska without a trace  — Anchorage Daily News
The official version of events, according to a still active missing person's bulletin from the Alaska State Troopers is that Griffis went into the wild "to test out a survival 'cocoon' that he had invented.

Related Posts