Posts with tag routing

JavaScript SDK 6.0 Beta: Now with iPhone Events

iPhone ScreenshotWe've had a lot of excitement this month with multiple launches and cool projects. We wanted to make sure that we also highlight our recently updated JavaScript 6.0 SDK Beta. In the latest build, we've got some great additions to the feature set:

  • Overlay support, including CircleOverlay for quickly showing a radius
  • Routes can now be run without needing a map
  • Wrapper functions for easy access to the Directions Web Service RouteMatrix call

The big new feature this time is support for iPhone/Mobile Safari events such as pinchToZoom. When Mobile Safari is detected, the support module is automatically included, registering touch events.

In a few lines of code, you can also take advantage of the geolocation services in the device and default your map the the user's location.

navigator.geolocation.getCurrentPosition(
  function(position) {
    map.setCenter(
      {
        lat:  position.coords.latitude,
        lng:  position.coords.longitude
      }
    );
  }
);

More news and announcements coming soon. Stay tuned.

Directions Web Service Beta: Optimized Routing Options Added for Optional Optimal Directions

We recently announced the beta of our new Directions Web Service for the MapQuest Platform; today we want to tell you that the team just added Optimized Routing functionality to the code.

If you're not familiar with Optimized Routing, it basically works like this:

Say the users of the app you've built using the Directions Web Service plug in a bunch of places they need to go. They have the addresses, but aren't really familiar with how far away all of these stops are from each other. With Optimized Routing, all of the stops between the first and last are reordered for the shortest overall distance or drive time.

Now it is still a work in progress, so keep in mind that Optimized Routing is designed for use on locations that are relatively nearby to each other (e.g.: delivery or repair services, planning a tour of open houses, etc.) It will attempt to optimize longer distances, but to meet performance limits, it may estimate the drive time calculation. This could lead to a less than optimally optimized route.

If you haven't yet checked out the Developer's Guide to the beta Web Directions Service, please do so and give us your thoughts and feedback.

Also, thanks for all the Directions Web Service mentions on the blogs and on Twitter. We are paying attention to your feedback and comments and appreciate the support. We also dig that you enjoy the phrase "sane and modern web service" as much as we do.

More features are on the way. Stay tuned.

Our New Directions Web Service Goes to Beta, Not the Moon

Today we're celebrating "One small step for man..." However, it turns out that it's the 40th anniversary of the Moon Landing we're celebrating, not today's beta release of our new Directions Web Service. Well I say: "Why can't we celebrate both?"

And while you'll likely never set foot on the Moon, you can check out our first beta of our new MapQuest Platform: Directions Web Service right now. We've taken our decades worth of routing technology and know-how and have been rewriting it into a sane and modern web service that's easy to use.

How easy?

http://platform.beta.mapquest.com/directions/v1/route?key=<your app key here>&from=Lancaster,PA&to=York,PA&callback=renderNarrative

This simple request will return a JSONP response containing the directions narrative data and then fires the defined JavaScript callback function in your app. You then have the flexibility to display the information in your UI however you want.

Yes, that easy.

Some other tidbits of useful information regarding our Directions Web Service:

  • The service will utilize the following formats:
    • Key-Value pairs submitted via HTTP GET or POST
    • JSON
    • XML
    • ...and more formats are in the works. Check the Developer Network Beta page for updates.
  • The format supplied does not have to match the format requested either. Send us XML but ask for a JSON response. Mix and Match to fit the needs of your application.
  • You can make your Directions requests as simple or as advanced as you'd like
  • If there's an ambiguity in one of the locations, we will return a list of location choices or you can opt for us to take the first location and just return your directions
  • You can return the full route shape or in a performance encoded format for size
  • road shield The response returns the image URIs of the road shields, making it easy to manage how and where you display them
  • More functionality, such as route matrix and optimized routing will be available in future beta updates

All the details are in the Directions Web Service Documentation, which we've also baked right into the service.

One important thing to note: You need to use a Developer License key in order to use beta services. There is no-cost associated with using a Developer License. Signup here.

I was going to close out this post with something, like "It's out of this world," but it's probably a bit cheesy, ya'know, like the stuff the Moon is made out of. How about you check it out and let us know what you think instead?