Time Dependent Routing and Path From Route added to Directions Service Beta

We have two new features for the Directions Web Service Beta today. One of which is awesome and cool, and is rather obvious in what it does - That would be Time Dependent Routing. The second is incredibly powerful and complex, and is going to take a little time to explain, and that is Path From Route.

Time Dependent Routing

We've added new parameters to the Route function that let you tell us what time, and on what day, you want to start your directions. "Why would that matter?" I hear you ask. Well, the road network can change depending on the time of day. Sometimes a road is open, and sometimes it is not. Sometimes you can turn left at an intersection, and sometimes you can't. There's usually a sign at these lights telling you the hours you are allowed to turn left, and the hours you aren't. You normally only get to see them at the wrong time of day, sitting in a left turn lane with your indicator blinking, wondering how you are going to get back into traffic and what to do now you can't use the road you thought you could. We try to avoid giving people directions that would leave them stranded like that. However, now, by telling us when you plan to travel, we can take this into account and provide better directions that could get you there faster than if we didn't know when you were traveling.

Make sense? good! ok, here's an example...

restricted turn
Because you cannot turn left at certain times, normally we have to route you round the block to make sure you aren't stuck at a left turn you can't make
unrestricted turn
But if you tell the directions service that you are travelling at 4 PM on a saturday, we know you can turn left.

You can see an interactive example in the documentation, by following this link. Details on the parameters are found here

Path From Route

OK, this could be hard to explain, so bear with me. If you have a bunch of points or places, and you have a route you are going to be traveling, this function takes them both, and will tell you how far away from your route each point is, and how long it will take to drive to each point from the nearest point on your route where you could actually leave it AND tells you the Lat/Lng of where you would leave your route to go to each place.

Again, lets see if an example would help.

Lancaster - Hershey, plus a bunch of random locations
1. Lets assume we are driving from Lancaster, PA to Hershey, PA. We have a bunch of Gas Stations (note: these are not real, but randomly generated for the example), and we want to know which ones are accessible within five driving minutes from our route
Locations filtered for those which are with 5 minutes drive off of the route.
2. So we tell the PathFromRoute function to compare these gas stations to our route. We also tell it that we are only interested in gas stations that we can get to in 5 minutes (we could also have said 5 miles, for a different result). the service will provide the necessary information to filter the gas stations.
Showing the details that are returned by PathFromRoute
3. If we examine three of the points returned within 5 minutes of our route, we can see that for each point we receive the driving distance and time, as well as the latitude & longitude of where to leave our original route to detour to the gas station. Using that Lat/Lng as a starting point, we can then generate the detour directions to the gas station.

Still with me? Great!. Further details on the PathFromRoute function, as well as an interactive sample, can be found here.

Web 2.0 Geocoding Service Launched!

Today we are very proud to announce that our new Geocoding Service has left Beta and has gone live to Production at www.mapquestapi.com/geocoding

This is our third web service we have pushed to Beta, iterated, and then released to production, since we first pushed out the Beta of the Directions Web Service on July 20th. When you consider that we also have the Static Map Service as well as version 6 of the JavaScript and ActionScript SDKs in Beta, I think that is a rather incredible pace we are maintaining!

I'm not much of one for flowery words, so I'll let the product speak for itself.

The MapQuest Platform: Geocoding Web Service allows you to access MapQuest geo-location data directly over HTTP without having to go through a language-specific SDK. Requests can be submitted as Key-Value pairs, JSON, XML and more. Responses do not have to match the request-type; mix-and-match to fit your development needs. Full documentation, forums, and other resources are available on the Developer Network

Features

Address Geocode function
Provide either a single line address, or an address broken down into its component parts (5-line) and receive back potential addresses and lat/lngs, in order of confidence
Here's an example of just how easy it is:
http://www.mapquestapi.com/geocoding/v1/address?key=YOUR_KEY_HERE&location=Lancaster&format=xml
will return a result you can view here
or, if you want to be particularly impressed by how easy it is to use, try out the little geocoding form I built right into the blog post! now THATS COOL!! I've deliberately picked a default town name that returns ambiguities - did you even know there were four towns in Georgia all named Four Points? Why don't you give your town name a try, but without entering the state, just to see how many other towns with the same name exist in the country.

(Results will be displayed below)

Reverse Geocode function
Provide a Latitude and Longitude, and receive back the known address information of that location.
Batch Geocode function
Geocode up to 100 locations at once in a single batch function call. You can also receive the output in a delimited-text file for easy importing into Excel or a database.
Reflected User-provided values
Add your own data into the location object on your request, and receive it back in the response. Great for helping you maintain state in your application, and for keeping your own information about the location packaged together for your application.
ViewPort Biasing
If you provide a Map Bounds as part of your geocode call, ambiguity results within the map bounds will be moved to the top of the results list. So if you have someone already staring at a map, this greatly improves the chance that the place they are looking for is the top result
ccTLD Biasing (Country Code Domains)
If you don't provide a country for the address, the country will default to the domain of the web address making the geocoding request. For example, if you make a request from http://www.myAwesomeSite.co.fr, we will default the country to France unless you tell us differently.
Thumbnail Ambiguity maps
Each ambiguity result can return a static map URL that provides a thumbnail image of the ambiguous location, if you wish to display these to end-users for some context when disambiguating.
Delimited File Output
For any of the geocoding service functions, you can specify outFormat=file and a delimiter=of Comma(,) Pipe(|) Colon(:) or semi-colon(;). The service will then return a delimited text file including a header row. This should be especially useful for the batch geocoding function

Stay Tuned for more updates

More updates to Beta, and more Production roll-outs to come before the end of the year - we're not done yet

Please remember to subscribe to the RSS feed, follow MapQuest on Twitter, or become a Fan of MapQuest on Facebook by clicking the links at the top-right of the page. Thanks!

A Ton of updates for Static Map Service and Geocoding in Beta

The Geocoding and Static Map Service teams have provided another update with more feature enhancements and improvements. We hope you like them, try them, and find them useful. Please remember to provide feedback on the Beta Forums if you find the time. Ok, enough chit-chat! On with the features...

More details on the features listed below are always found on the Developer Network Beta page

Geocoding Service

Delimited Text File Output

We've added a new format to the geocoding service of outFormat=file. It can be used for geocoding, reverse geocoding, and batch geocoding. The response will be a text file containing your results.

You can specify the delimiter you want out of a list that includes commas, pipes, colons, and semi-colons - so, for example delimiter=|,

The file also contains a header row, so you should find yourself with a nice import into a database or a spreadsheet. The hope is that those using the Batch Geocode function will find this very useful

Static Map Service

New Function: Place Map!

A new /getPlaceMap?location= function has been added to the Static map service that easily allows you to get a map for any place you know the address of without having to worry about using the geocoding service to get the latitude / longitude.

It takes a single location, map size, and zoom level. You can provide a single icon if you want a POI on the map to show the exact location.

One item to note: because the return is an image, we can't provide an ambiguities list like we can in the Directions Service. We always take the top of the ambiguous results (the one with the highest granularity and confidence) and use that for the image

Auto Best Fit

This one is very simple! If you have a group of POIs on the map and do NOT provide us with a zoom level of a center Lat/Lng, the returned map will be fitted around your POIs at the closest zoom to fit them all in.

Just Declutter it please!

We've added a declutter=true parameter to the static map as well, so you no longer have to provide all the pixel X/Y offsets. Instead, just set declutter to "true" and the service will handle it all. Because of this change, all the pixel X/Y offset values have been made Optional.

Additional Map Styles

Another new parameter now unlocks different map styles. style= provides black & white, classic, European styles, and others. Check the documentation for the full list


Other Static Map Additions

We've made quite a few other tweaks to the Static Map Service too:

  • Added support for Compressed Line overlays using a shapeFormat parameter
  • The MapType parameter now defaults to Map
  • POI Offset values are now optional
  • Minimum Map Size restrictions have been removed

Thats all folks

More to come soon! The end of the year draws nigh and we're looking to finish it out on a high note by sustaining our current pace of betas and production roll-outs, so stay tuned and check back frequently.

Almost forgot - my erstwhile companion in crime on this blog, Josh, has asked me to remind everyone to subscribe to the RSS feed, follow MapQuest on Twitter, or become a Fan of MapQuest on Facebook by clicking the links at the top-right of the page. Thanks!

New MapQuest Map Style Added to JS and AS3 SDKs in Beta

You may have noticed that MapQuest.com has a new style to its maps today. We're celebrating this launch on the SDK team by pushing an extra special update to the JavaScript and ActionScript 6.0 SDKs in Beta to enable the new map style.

While we're at it, we also added a few other things to the JavaScript SDK. Namely:

  • A new Overview Map control you can add to the main map
  • A documentation overhaul for presentation
  • New Documentation sections, including how to do your own custom POIs

Check the Developer Network Beta section for the latest AS3 Packages (AS3 Release 3) and for JavaScript include string and docs (JS Release 4).

And now, because a picture can paint a thousand words - a totally gratuitous amount of screenshots!

If you like these, you can see more, and read more, on the main MapQuest Blog

The New North America (Zoom Level 2)
The New North America (Zoom Level 2).

The new map style with Globe View turned on in the AS3 map toolkit
The new map style with Globe View turned on in the AS3 SDK.

New map Style with the Overview Map control in the JavaScript SDK
New map Style with the Overview Map control in the JavaScript SDK.

New Map Style with a Draggable Route added and in mid-drag
New Map Style with a Draggable Route added and in mid-drag.

Draggable Routes for Actionscript now in Beta

Not to be outdone by the latest beta releases from the Services Team the SDK team have a brand new Directions module for the Actionscript/Flex SDK that uses the new Directions Service already in production.

ActionScript SDK Updates

Available on the Developer Network Beta page.

Completely new Directions module
There is a new Directions.swc which replaces all the routing functionality previously found in the AdvantageApi.swc - this is a complete overhaul and upgrade to the object model and how you use it - it is now MUCH MUCH simpler and saner - and smaller!
Simplified Routing Function
Create a route object, pass in your locations, provide your map object, and watch the route ribbon and stop-icons appear on the map automagically. Provide an event handler to receive the directions narrative. Done!.
If you are a power-user type, you can dive under the covers to provide all the different options available from the underlying Directions Service or customize the look and feel of the route ribbon and stop-icons that are added to the map.

The code would look something like this:

this.myMap = new TileMap("YOUR_KEY_HERE");
//create an array of locations
var arrLocations:Array = new Array();
arrLocations = ['Lancaster, PA', 'York, PA'];

//create the Directions object, hand in map object and locations array
this.dir = new Directions(myMap, arrLocations);
//Success Listener - handle the narrative here
dir.addEventListener(DirectionsEvent.DIRECTIONS_SUCCESS, doSuccess);

//get the route
dir.route();
Draggable Routes!
If you want your users to be able to drag the route, then on the directions object, just add dir.ribbonIsDraggable = true; before asking for the route - at the end of each drag, your directions success event handler is called again so you can handle the updated narrative - that's it. done!
static map screenshot

Optimized Routing
With Optimized Routing, all of the stops between the first and last are reordered for the shortest overall distance or drive time, giving the most efficient path for visiting several locations on a single journey. Instead of calling the dir.route(); function, use the dir.optimizedRoute(); to get an optimized route.
Route Matrix
A Route Matrix request in the Directions Web Service will return a quick and easy calculation of the distances and drive times between a bunch of points. Nothing gets added to the map, the results are returned to your success listener, but you set up the directions object in the same way as a regular route and then call, for example, dir.routeMatrix(); instead.

Stay Tuned!

Work continues as we revitalize, enhance, upgrade, streamline, and simplify our web services and SDKs. It remains our goal to roll out each project to beta at the end of every sprint if possible (some things take more than one sprint). I hope to be back here soon with a nother blog post announcing more cool things

Batch Geocoding and Static Map Custom Icons in Beta

Hot on the heels of last week's releases we have another two Beta updates.

Geocoding Web Service Updates

Available at http://platform.beta.mapquest.com/geocoding.


Overhauled Documentation
First thing you'll notice is overhauled documentation and better examples for the previously available functions of geocode and reverse geocode. It should now match the style of the other services.
Batch Geocoding
We've added a new function that lets you geocode up to 100 addresses at once. Each address has its own ambiguity list returned in the results.
Map Biasing
If you provide a Map Bounds with your geocode request, then we will move the ambiguity results that are within the map area to the top of the list. For example, if you geocode the city of Lancaster, and prove a map bounds which contains south central PA, then Lancaster, PA will be at the top of the return list instead of Lancaster, CA.
ccTLD Biasing
We now default the first country used for geocoding to the country code found in your top level domain, instead of always to the U.S. For example, if your website is "myAwesomeSite.co.fr" we'll try geocoding in France first, instead of in the U.S. You can of course always override this merely by providing us the country as part of the address.
Ambiguity Static Maps
We've hooked the geocoding service up to the Static map service. Now, each ambiguity in the results also has a URL that provides a simple static map of the ambiguous location
static map screenshot

Static Map Web Service Updates

Available at http://platform.beta.mapquest.com/staticmap.


Custom Icons
You can now provide us with the URLs of your own custom icons for use on the static Maps. Because we cache the icons for performance, there is a new function to flush an icon from our cache, in case you update the icon.
custom icon screenshot
New Image Formats
You can now get static maps as .jpeg, .png, or .gif formats. the new parameter is imagetype=.
All Icons Available from pois= Parameter
All the icons used by the mcenter, pcenter, scenter, ecenter, and stop parameters are also now available as icon names for the pois= parameter.

More to Follow Coming Soon!

As we continue to iterate on our projects, we are striving to maintain a schedule of releasing new versions to beta every two weeks, with new features, bug fixes, and upgraded documentation, until the projects are complete and roll out to production. Stay tuned for more beta versions coming over the next weeks.

MapQuest Directions Web Service and Long URL Web Service Released

Along with today's relaunch of the MapQuest Developer Network, we're also launching two new products to go with it.

Directions Web Service

First is our new Directions Web Service, which frees you of having to use a language-specific SDK for directions data and provides maximum flexibility in how you integrate those directions into your application.

Features include:

  • Basic and Advanced Routing
  • Route Matrix
  • Draggable Routes

Long URL Web Service

One of the issues with Internet Explorer is that it has a 2048 character limit for URLs. This is problematic for long GET requests, since the URL could be truncated and cause an invalid request.

The Long URL Web Service provides a solution to this by allowing your request to be split up in chunks. We then provide a single response.

Easy to Use

Both of these products kick off our new approach to helping developers. The documentation also contains the working code samples with source code, and all of it lives along-side the service.

More to Come

More Web Services are in the works. Check out the Beta section of the MapQuest Developer Network to try out our Geocoding Web Service and our Static Map Web Service.

MapQuest Developer Network Relaunched!

DevNet Next

MapQuest is happy to announce the launch of a completely rebuilt and revised MapQuest Developer Network. Our goal is to make it easy for the growing development community to get started with the MapQuest Platform and for experienced developers to find what info they need fast.

What's New

Documentation Made Easy
Our new Web Services and upcoming 6.0 SDKs will have a simpler and concise set of documentation so you can view instructions, variables, samples, and source code all at-a-glance.
Consolidated Application Management
Your applications are now attached to MapQuest My Places. No more tracking multiple sets of credentials for the various MapQuest applications you manage. Access all of your account settings, tools, and resources from one place. If you were a user of our TRC, we've provided an easy way to migrate your accounts.
Reorganized Site; Cleaner Interface
Site content is now organized by product and technology, each with a dedicated forum to discuss topics with other developers. The site also has a cleaner look.

devnet screens

Check It Out

Please give our updated Developer Network a look and let us know what you think.

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.

We Love L.A.! Meet Us at Adobe Max!

In addition to auditioning for sitcoms at the studios, MapQuest will be at the Adobe Max conference in Los Angeles, October 4th-7th. We'll be talking to developers, showing demos of our MapQuest Platform using the current 5.3 AS3 SDK and our upcoming 6.0 SDK (currently in Beta). My colleague Ant will also be demonstrating his ability to cry on cue for any casting directors in attendance.

We've also partnered with Adobe to power an Interactive Map of the area. The MapQuest-built Adobe Max Locator application will show conference goers nearby restaurants, hotels, conference shuttle locations, and other hot spots near the Los Angeles Convention Center, home to this year's event.

Adobe Max Locator

If you're heading to Adobe Max, stop by and say "Hi!" We'll be in Community Pavilion Booth #843, sitting next to you in the Sessions, or in line to audition for the parts of "Guys in Background" for an upcoming episode of "How I Met Your Mother."

Next Page >