Posts with tag widget

Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 4 - Advanced Geocoding

Younger hackers are hard to classify. They're probably just as diverse as the old hackers are. We're all over the map. - Larry Wall

In Part 1 I showed you how to get started with the MapQuest Platform by getting a developer key. In Part 2 I put that key to use by providing access to a basic map in the Map It! widget. Part 3 showed you how to incorporate basic geocoding. In this installment I'll discuss more advanced geocoding topics - including handling multiple matches and specifying geocode search options.

Multiple Matches

The version of the Map It! widget developed in Part 3 added the ability to plot a point of interest on the map. In the Java application that was developed to return the coordinates of an address, only the first match is returned. What if the user enters a street address without the house number? Geocoding would actually return multiple results. We need to change the getLocation method developed in Part 3 to return each match. On a search without a house number for example, the geocoding process would return points for each range of addresses. Listing 1 shows how the getLocation method has been modified:

Continue reading Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 4 - Advanced Geocoding

Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 3 - Adding Geocoding

Somewhere there is a map of how it can be done. - Ben Stein

In Part 1 I showed you how to get started with the MapQuest Advantage API by getting a developer key. In Part 2 I put that key to use by providing access to a basic map in the Map It! widget. In this installment I'll show you how to incorporate basic geocoding.

About Geocoding

Geocoding is the process of converting an address into latitude and longitude coordinates that uniquely identify a location, and you can use to plot on a map. Applications using the MapQuest Platform can calculate the latitude and longitude of:

  • Street addresses and intersections, the highest accuracy geocoding methods.
  • Street blocks, including the nearest block to an invalid house number.
  • Postal codes, including ZIP, ZIP+2, and ZIP+4 codes.
  • City centers.
  • US state and Canadian province centers.
  • Country centers.
  • Centers of other administrative areas that are used internationally.

The Map It! application will allow users to enter an address in one of the following forms:

  • street address, zip
  • street address, city, state
  • street address, city, state, zip
  • street address, city, state, zip, country

Continue reading Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 3 - Adding Geocoding

Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 1

A civilized nation can have no enemies, and one cannot draw a line across a map, a line that doesn't even exist in nature and say that the ugly enemy lives on the one side, and good friends live on the other. - Thor Heyerdahl

The MapQuest Platform has become the preferred way for developers to integrate rich cartography into their applications. Using the MapQuest Platform, developers can provide street and satellite views. In addition points of interest, navigation, geocoding (converting an address to map coordinates), and routing are all supported. In this series of blogs - I will show developers how to build a Mac OS X Dashboard widget that will eventually provide mapping, point-to-point directions, and integration with the built-in Address book application - all powered by the MapQuest Platform.

Development Platforms

The MapQuest Platform APIs are accessible from a wide variety of development platforms and protocols. From the server side this includes: Java, .NET, and C++. From the client side this includes: AS3 (Adobe ActionScript 3), FUJAX, and JavaScript.

Signing Up

The MapQuest Developer Network is the place to get started. The site provides an overview of the APIs features, in addition to links providing an online demo, product brochures and more. Before a developer can begin using the APIs in their applications they need to sign up for a Free Edition or Developer license. As shown in Figure 1, you can start that process at - http://developer.mapquest.com/Home/WhyJoin - click on the Register button in the upper right.

Figure 1

You'll need to provide basic personal information, and accept the terms and conditions.

Shortly after you submit your information, you'll receive an email, you'll need to click on the link in the email to confirm your request. Once confirmed, you'll receive a second email in about 20 minutes. This email will contain the URL to the MapQuest Technical Resource Center, your username (which is the email address you used to sign up) and a temporary password, which you will change after your first login. Also included in the message is the authentication information you'll need to access the MapQuest Platform from your application. I'll be using this information later in this series of blogs.

After you login to the Technical Resource Center and change your password, as shown in Figure 2, you'll have complete access to the documentation, SDK downloads, examples, and your account information. Click on the My Account link to view the information shown in Figure 3.

Figure 2

Figure 3

In addition to your support form user id, you will be able to configure the referrers for your account. The referrer information basically provides information about the domains where you will be accessing the MapQuest Platform. Note at the bottom that there is an option to permit blank referrers. Read the warning note closely if you enable this option. I will discuss the specific referrer issues that occur with a Mac OS X Dashboard widget in the next post in these series.

Conclusion

You now know how to get started with the MapQuest APIs. Here are some resources for you to review before I begin to build the Dashboard widget. Dig in!