Posts with tag java

Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 7 - Address Book Integration

There's nothing that makes you so aware of the improvisation of human existence as a song unfinished. Or an old address book. - Carson McCullers

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. Part 3 showed you how to incorporate basic geocoding. In Part 4 I discussed more advanced geocoding topics - including handling multiple matches and specifying geocode search options. Part 5 discussed adding widget options including the default zoom level, specifying point of interest icons, and the default map type. Part 6 discussed how to add direction capabilities to the widget. In this final installment I'll talk about how easy it is to integrate address searching with the Mac OS X Address Book application.

Address Book Searching

The Mac OS X Address Book application is bundled with the OS X operating system, providing a way for users to organize their contacts and associated information including their addresses. Also included with Mac OS X is an Address Book widget, which provides access to the Address Book database from a widget. I've explored the Address Book widget code, and extracted the AddressBookPlugIn. Plug-ins are native code that can be used to access operating system levels features from a widget's JavaScript interface.

Continue reading Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 7 - Address Book Integration

Meet Us at JavaOne

MapQuest will be in attendance at JavaOne being held next week at the Moscone Center in San Francisco, CA. You can visit us in the Pavilion at booth #1124; a number of the MapQuest Developers will also be running around and attending sessions. Feel free to stop and talk with us.

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

Stand in the place where you live, Now face North, Think about direction, Wonder why you haven't before - REM

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. Part 3 showed you how to incorporate basic geocoding. In Part 4 I discussed more advanced geocoding topics - including handling multiple matches and specifying geocode search options. Part 5 discussed adding widget options including the default zoom level, specifying point of interest icons, and the default map type. In this installment I'll discuss how to add direction capabilities to the widget!

Directions

Listing 1 demonstrates how to add directions to our widget map. I've added an additional search box where the user can enter the destination address. I've use the Java application developed in Part 3 to obtain the coordinates of the route beginning and destination points. Using the coordinates, I've created the MQGeoAddress object for both points. A new session is created for routing. The starting point and destination are added to the way points. Once the route is calculated through the doRoute method, the highlighted route is added to then added to the map.

Continue reading Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 6 - Directions

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

It is not down in any map; true places never are. - Herman Melville

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 Part 4 I discussed more advanced geocoding topics - including handling multiple matches and specifying geocode search options. In this installment I'll discuss adding some options to the widget. Specifically I'll discuss setting the default zoom level when adding an API, specifying point of interest icons, and the default map type.

Continue reading Map It! - Building a MapQuest Mac OS X Dashboard Widget - Part 5 - Enhancing Map It!

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

Develop Freely! Introducing: MapQuest Platform: Free Edition.

Hi! If you're reading this, you've gotten word we have this Developer Blog. A number of thoughts might be running through your mind as you hover over the "next" button on your feed reader or "close" on this browser tab:

"MapQuest has a blog?"

"MapQuest has a Developer Blog?"

"MapQuest has Developers?"

and if you're a mash-up developer: "MapQuest has APIs?"

Yeah, yeah, we know. Over the past few years we know it seemed that on the outside MapQuest seemed a bit behind the times, a Web 1.0 giant sitting on the bench of a Web 2.0 Internet. However, inside MapQuest there have been people hard at work trying to change our culture and perspective into something that can thrive in a "Web 2.0" world. We've been changing teams, processes, some developers switched to Macs -- serious, real change.

While we've been quiet, we've also been building things. More accurately, we've been rebuilding things. Starting with the 5.0 releases, we have rebuilt much of our geospatial web services platform from the ground up. Currently at version 5.2 and with 5.3 in beta, these releases contain lots of practical things, lots of cool things, lots of helpful things. Now we're making them free things.

Developer Choice

We're happy to finally introduce the MapQuest Platform: Free Edition. We've taken nearly all the features of our platform and made them freely available to developers. We believe that Free Edition provides developers a comprehensive toolset and flexible APIs so they can build well, whatever they want. Developers can choose the programming language of their choice and the features they need to build the applications they want, the way they want.

Here's some of the Free Edition features:

  • Six APIs
    • We're giving developers greater flexibility and choice by enabling them to develop in a variety of programming languages and environments, they can even mix and match:
      • Java
      • C++
      • .NET
      • JavaScript
      • AS3 (Adobe ActionScript 3: Flash, Flex, AIR)
      • Our newest API: FUJAX (Flash Under JavaScript and XML), which allows developers to write in JavaScript, yet leverage the power of Flash.
      • and of course LOLcode. Nope, sorry, still no LOLcode suport.
  • A Rich Mapping Interface for creating Rich Internet Applications with our JavaScript, AS3, or FUJAX APIs:
    • Aerial Imagery and Hybrid Views - Satellite imagery and aerial photography.
    • Smart Rollovers - Rollover windows that adapt their size and positioning on the map based on the content placed in the window.
    • Smooth Zoom - Animated transitions between zoom levels.
    • Globe View - A map of the world presented as an interactive globe.
    • "Flickable" Maps - Maps that continue to pan based on speed and friction settings.
    • Advanced Shape Overlays - Build apps that allow users to create and interact with a variety of overlays on maps.
    • Advanced Map Marker Features - With "declutter mode," automatically move collided markers (POIs) to alternate positions on the map with a customizable leader line pointing back to their original location.
  • Unlimited Maps - Worldwide: Standard or Tiled.
  • Unlimited Geocoding - Multi-line and Single-line Geocoding, Real-time Batch Geocoding, Reverse Geocoding, Postal Code and Town Geocoding.
  • Unlimited Routing - Point-to-Point, Multi-point or Optimized.
  • Simplified Data Management - MapQuest offers access to simple tools to upload and manage location information to help keep websites accurate and relevant.

You'll find more information on all of this on the MapQuest Developer Network, where you can also download the code and give the Free Edition a test drive. You can also find documentation, example applications and how-to articles to reference while checking out our APIs.

Thanks!