Posts with tag directions

MapQuest AS3 / Flex SDK V6.0 Launched

I am extremely happy to announce that we have launched the version 6.0 of the MapQuest Actionscript / Flex SDK for mapping, geocoding, directions, geo search, and traffic!

Before I go any further, here are the important links:

You can download the AS3 / Flex SDK here.

You can view the Samples here.

You can view the documentation here.

You can access the AS3 / Flex section of the Developer Network here.

And if you don't have one already, you can get an appKey here.

During the course of the project we have touched pretty much every line of code to overhaul, upgrade, enhance, optimize and improve the SDK. We also re-wrote several main sections of the SDK from the ground up to use the new MapQuest Web Services. What follows is by no means a complete list of the things we have done to the SDK, but should give a nice overview of the main enhancements.


FlashBuilder 4 (beta) Support
The SDK works with both FlexBuilder 3 and FlashBuilder 4. The SDK also works with both Flash Player 9 and Flash Player 10.
Single .swc, Smaller Compiled App
We've consolidated all the different files into one single .swc. We also removed dependencies from the core TileMap object wherever possible, typically resulting in a smaller final SWF size .
Object model Overhaul, Removed Getter/Setters
Most explicit object.setProperty(value) functions have been removed from the SDK, in favor of a more AS3-friendly object.property = value. Returning these values has also been changed to object.property. Not only does this make the SDk more intuitive, it also removed quite a lot of weight!
Shapes And Drawing Engine Overhaul
The core shape objects have been overhauled to be simpler, and use a new internal drawing engine. As a result we have been able to add a couple of other new cool features. One example is that you can now add child overlays to a main overlay, which then act as clipping masks to punch holes in your polygons, rectangles, ellipses, and circles. So now you can do donut polygons! Yay!

Overlay Cutouts
You can use any shape overlay to cut holes.
Directions, Search, and Geocoding completely re-written
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! Create the appropriate service object, pass in your parameters, provide your map object, and watch the results appear on the map automagically. Provide an event handler to receive the results. Done!. If you are a power-user type, you can dive under the covers to provide all the different options available from the underlying services.
Draggable Routes!
If you want your users to be able to drag the route, then just add dir.ribbonIsDraggable = true; on the directions object 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!

New Map Style with a Draggable Route added and in mid-drag
New Map Style with a Draggable Route added and in mid-drag.
New Controls
There's a new carousel control that looks like the MapQuest.com Biz Locator control. this tool lets you easily add ShapeCollections to the map, with a pre-built UI for users to turn these collections off and on, on top of the map. There's also an overview map control you can place in the corner of the main map, as well as other controls to enable mouse scroll wheel zooming, and keyboard map interaction.
DefaultTileMap Component
The new DefaultTileMap object and drag and drop component sets up the map UI to work just like MapQuest.com, making it even quicker to set up all the controls and mouse interactions.
New Declutter Modes
Decluttering was also overhauled, providing new ways to declutter the map. My personal favourite is the new ForceDeclutter which animates the POIs moving away from each other until they are decluttered. It makes me giggle every time.

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.

There are so many things we have done to the SDK, I am sure I've missed a few big items. I could mention the Globe View changes (you can now set the globe size, and freeze either axis, or make it auto-rotate to be vertical again when someone stops spinning it); I could also mention the spiffy new documentation that includes sections on how to make your own infowindows, POIs, and custom controls; But, unfortunately, I am out of time for now, as I must go prepare for SXSW later this week. If you are going to the conference, please do stop by the booth (#401) and say "Hi" to us, check out the new Platform and, if there is room left, come to our BBQ party!

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.

Geocoding and Static Map Web Services Now In Beta

In recent weeks we've had a string of updates talking about new services and features we've been working on. Today we've got two new Web Services we're releasing into beta and a feature update for the Beta Directions Web Service.

Geocoding Web Service

We're jazzed to release the Geocoding Web Service into beta. You can now make a simple request containing an address and the service will return a latitude and longitude.

http://platform.beta.mapquest.com/geocode/v1/address
?location=lancaster%20pa
&key=YOUR_KEY_HERE

You can also make a request containing the Latitude and longitude and we'll tell you the address of that location.

http://platform.beta.mapquest.com/geocode/v1/reverse
?lat=40.0378
&lng=-76.305801
&key=YOUR_KEY_HERE

Static Map Web Service

While interactive and draggable maps are useful for many things, sometimes a good ol' single map image is what's needed for your application. While we've made these maps available for well over a decade, you can now build them using our new Static Map Web Service. This allows you to easily create, configure, and return a map image. this includes adding POI icons, traffic data, or shapes to you maps.

This also means you can easily embed a map into any web page without writing or embedding any code. Just insert the map like any other image.

http://platform.beta.mapquest.com/staticmap/v3/getmap
?type=map
&size=400,200
&zoom=7
&center=40.054600,-76.313100
&key=YOUR_KEY_HERE

static map

Directions Web Service

Powered by our new Static Map Web Service, you can now return a static map image for each maneuver of a route narrative. Like on MapQuest.com, this will allow you to show your users a map containing additional detail of the transition to their route.

maneuver map

More information is available on our Developer Network Beta page and included in the MapQuest Platform: Web Services Documentation.

Big Beta Updates: Fun Globes, Colorful Stars, Zooming Mice, Chunked URLs and More

So we have a bonanza of beta and preview updates to share with you. We've been busy making a number of updates to the MapQuest Platform and we've been creating new Web Services and revising our client-side SDKs.

Here's what we've got to show you today:

AS3 SDK 6.0 - NEW!

We're happy to introduce the preview release of our AS3 SDKs, Version 6.0. This rewrite makes the SDK more modular, create smaller final .swfs, and add and improve a number of new features like:

  • POI Decluttering Refactored
  • globe view / ocean breeze controls screenOur popular Globe View has been refactored and made a separate component. We've even added a handy feature to let the globe reorient itself when you've turned your world upside-down.
  • New Control Component style (Ocean Breeze) to match the ones available on MapQuest.com
  • Raster images are now remotely loaded. So your application only pulls in what's needed
  • Overview map control added
  • Mouse-wheel zoom controls and keyboard controls added
  • We've added a vector-based POI star. It's scalable and color-customizable too.

vector stars

Download and check out samples from our Beta page.

JavaScript SDKs 6.0 - UPDATED!

In this update, we've added:

  • Route Options for tailoring your route
  • Toggle Route Dragging on and off
  • Basic mouse wheel support for zooming

Check out the updated documentation and samples here.

Long URL Web Service - NEW!

Today also marks the introduction of a new service which will allow you to manage large GET requests in Internet Explorer, which can't handle them. While we've put a lot of effort into making our URLs smaller and sane to the human eye, there are still scenarios where a complex request can get pretty beefy. Our new Long URL Web Service will automatically chunk-up the request and still be able to use a JSONP callback in the response.

Directions Web Service - UPDATED!

In our fourth feature release, we've now added draggable routes to the service. You now have the option of adding draggable routes through the Directions Web Service or our JavaScript SDK 6.0.

We've also added a Route Shape feature. This will allow you to return a route shape from a previous request without have to re-run the route.

Even more features and updates are in the works. Stay Tuned.

MapQuest Platform: JavaScript SDK 6.0 Preview Release with Draggable Routes

Today we've released a preview of our upcoming 6.0 version of the MapQuest Platform: JavaScript SDK. This version release is a complete overhaul of the code base and designed to be more modular, more lightweight, and easier-to-use code. We've also simplified our documentation, making it easier to follow and reference and complete with inline samples and source-code snippets.

One notable feature in this initial release is that Draggable Route functionality is included. This will allow developers to build applications that let their users dynamically edit their directions right from the map.

drag route screenshot

Find out more information on our Developer Network Beta Page, and we welcome your feedback.

Directions Web Service Beta Adds Route Matrix Feature

Last week we pushed out Optimized Routing to our Directions Web Service beta. The week before that we introduced our new Directions Web Service. Today we're making the Route Matrix feature available.

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.

In the table below, we want to compare the times and distances between:

  • York, PA
  • Lancaster, PA
  • Boalsburg, PA
  • and Sunbury, PA

You'd ask the Directions Web Service something like this:

    REQUEST URL:
 http://platform.beta.mapquest.com/directions/v1/routematrix?key=YOUR_KEY_HERE

    REQUEST BODY:
    {
       locations: [
          "York, PA",
          "Lancaster, PA",
          "Boalsburg, PA",
          "Sunbury, PA"
       ],
       options: {
          allToAll: true
       }
    }    
  

And with the results, you could display something like this:

Driving distance (in miles)

TO
FROM
York, PA Lancaster, PA Boalsburg, PA Sunbury, PA
York, PA 0.00 25.68 107.85 78.45
Lancaster, PA 25.92 0.00 120.64 91.25
Boalsburg, PA 107.42 120.94 0.00 62.48
Sunbury, PA 78.84 92.36 61.80 0.00

Driving times (in seconds)

TO
FROM
York, PA Lancaster, PA Boalsburg, PA Sunbury, PA
York, PA 0 2260 7253 5930
Lancaster, PA 2348 0 7771 6448
Boalsburg, PA 7350 7816 0 5098
Sunbury, PA 6048 6514 5019 0

Check out the complete documentation for Route Matrix and the rest of the Directions Web Service Beta and please continue to send us your feedback.

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?

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