MapQuest Developer Blog

Archives for Kumiko Yamazaki

Associate Tech Manager, Software Development

"Maps."
  • Open Flash Maps API with OpenStreetMap Support!

    Today we're here to announce the latest improvement to our Flash Maps API - support of the MapQuest Open Initiatives!! Dubbed the Open Flash Maps API, this API is very similar to the standard Flash Maps API except it relies solely on open data. It includes support of OpenStreetMap, Open Aerial Tiles, Open Directions Service, Nominatim Search Service, and other Open Services. Both versions of the API obviously have their advantages but if you love the concept of 'open data' and the ability to edit and improve data quality yourself, the Open Flash Maps API is definitely for you! Now that we've hopefully piqued your interest, here are some links to help you get started. [caption id="attachment_1431" align="aligncenter" width="500" caption="Route example found in the Samples Explorer Application."][/caption] The source code for each sample can also be easily viewed within the application.. so what are you waiting for? Copy it, play with it, create an application, and share it on our forums or @MapQuestTech!
  • Get Creative with the Open Static Maps API

    As many of you are aware, MapQuest has had a Static Maps API Service using licensed data for quite some time now. So, it's only fair that we now provide the same service using open data for the open community! What does the API do then? The Open Static Map Service enables the user to create beautiful static map images generated via an HTTP request for their website or publication. The simplest example requires only a few key parameters:
    • key - your MapQuest AppKey
    • center - center of map in latitude/longitude
    • size - size of map in pixels
    • zoom - zoom level of map
    For example, http://open.mapquestapi.com/staticmap/v4/getmap?key=Kmjtd%7Cluu7n162n1%2C22%3Do5-h61wh&size=600,200&zoom=15&center=41.862648,-87.615549 will result in the following image: But what if you need to plot POI locations? On satellite imagery? Easy. http://open.mapquestapi.com/staticmap/v4/getmap?key=48RTFOpswl9ML0bHgxx0bcIl0piyoFr3&size=600,200&zoom=3¢er=35.60395,-98.906248&type=sat&pois=yellow_1,33.748867,-84.388185,0,0|yellow_1,29.763066,-95.363351,0,0 How about a route? No problem. http://open.mapquestapi.com/staticmap/v4/getmap?key=48RTFOpswl9ML0bHgxx0bcIl0piyoFr3&size=600,200&zoom=14&shapeformat=cmp¢er=40.770021,-73.984003&shape=y_zwFjsrbMxWkz@??}DoC??a@}CyBt@ySiN??fDeP&scenter=40.77069,-73.992378&ecenter=40.770935,-73.97644 Multiple features, plus an automatic 'declutter' option? You got it! http://open.mapquestapi.com/staticmap/v4/getmap?key=48RTFOpswl9ML0bHgxx0bcIl0piyoFr3&declutter=true&size=600,200¢er=40.720212,-74.066627&zoom=5&pois=yellow_1,40.037661,-76.305977,0,0|orange_1,41.761715,-72.686376,0,0|orange_1,41.394906,-73.454489,0,0|orange_1,41.380665,-73.420447,0,0 Now that you've seen a few examples, don't be shy! Get creative by dynamically producing static maps for your website, adding your own custom icons, and more! Visit the Open Static Map Developer's Guide to learn about additional request parameters and options available. Or if you're just a beginner, perhaps you'll want to head straight to the Open Static Map Wizard. As always, find us on Twitter @MapQuestTech or the Developer Network to provide feedback!
  • Transit Routes Now Available for the (Open) Directions API

    New data, new services, this is just how we roll! With the latest addition of transit data, developers can now incorporate transit routing into their own mapping application. Using this service is really no different than directly calling for our driving, walking, or biking directions. Simply changing the routeType to 'multimodal' will prompt MapQuest to begin searching for an optimal route combining pedestrian routes with transit routes. Because transit data is also time-sensitive, some key parameters outlined on Date/Time Routing Options have been added and are required for the service to return a response. Seen below is an example of a transit route request using the Metro from the oft forgotten about and climbable (!!) Albert Einstein Memorial to the Verizon Center in Washington, DC. http://open.mapquestapi.com/directions/v1/route?key=YOUR-KEY-HERE&routeType=multimodal&timeType=1&outFormat=xml&from=38.892551,-77.048244&to=38.898137,-77.020928 As documented on the Date/Time Routing Options page, when the value of timeType is set to 1, the current time is sent to generate a transit route. Other options include choosing a certain day of the week and time, or selecting a specific date and time -- all of which can have a major impact on the transit route returned. Don't forget to also check out the updated Advanced Routing Sample and give our API a test-drive! [caption id="attachment_1276" align="aligncenter" width="600" caption="Partial screenshot of the Advanced Routing Sample using the Open Directions API"][/caption] Currently, transit directions are available for six major metropolitan areas: New York, Chicago, Washington, D.C., Boston, Philadelphia and San Francisco in both our Directions API and the Open Directions API. Please feel free to provide feedback on our forums or @MapQuestTech while we look to increase the amount of transit data available and improve the service itself. Happy Transit Commuting!
  • Flash Maps API: Now in Mercator!

    Yes, it's true, the latest version of our Flash Maps API is in Mercator Projection! We've also added a number of new features and made other improvements with Version 7.0.0, some of which can be found in our official release notes and summarized below.

    Mercator Projection

    Online map projections can go unnoticed for many but also be the subject of great debate for others. We hope this switch proves to be more user-friendly, especially for those dealing with multiple data sources and finding that the standard for online mapping has increasingly shifted towards the more popular Mercator Projection. Developers will also be glad to know it has zero impact on their existing applications unless custom tilelayers were being utilized, in which case the tilelayer will first need to be reprojected. Below is an example using the new Flash Maps API in the Mercator Projection. It is shown demonstrating the retrieval of multiple GeoRSS feeds and the integration of video playback, and best of all, the source code has been made available for download! [caption id="attachment_1210" align="aligncenter" width="500" caption="Flash Maps API: CNN iReport Demo"][/caption]

    Higher Zoom Levels

    In addition to making the switch to Mercator, we've reduced scale limitations by now supporting zoom levels 2-18. This allows for the development of larger scale maps which show greater detail at the street level and can prove to be the optimal zoom level for your next location-based application.

    Updated Design

    With each release, we also try to mimic the robust features and design elements found on the MapQuest.com site and make it available for developers. As seen above with the CNN iReport example and others found in Examples & Tutorials on the Developer Network, the zoom controller and auto-generated POIs have been further refined to reflect the look and feel of MapQuest. You can always find more documentation and source code on the Developer Network so please feel free to browse the site. All questions and feedback can be directed at @MapQuestTech on Twitter or be posted on the Flash Maps API Forums.
  • Joining the Open SDK: Draggable Bike Routes!

    [caption id="attachment_1138" align="alignright" width="285" caption="Chris Weaver - today's featured MapQuest Dev."][/caption] Some days it can be a difficult task to overcome writer's block and other days, like today, you're asked to write about an awesome new service and blogging comes easy. So without further ado, I present you with draggable bike routes for our new Open JavaScript SDK! The customization that drag routing on open data allows is by far superior to anything we've ever had (of course, until our next update). You'll also see below that implementing this is a snap. But first, a special thank you goes out to our Systems Architect, Chris Weaver, who has put forth a significant effort to help support the Open JavaScript SDK and the new bike routing options! Now in order to fully understand the benefits of this service, let's take a look at some of the main user concerns and what MapQuest can do to address them.

    Map is Missing Data

    Know a shortcut specific to cyclists/pedestrians? Add it to OpenStreetMap (OSM)! The new data will then be picked up by the MapQuest servers so you and everyone else will be able to drag route on the new bike path. If you need assistance with adding bike paths in OSM, be sure to check out this great tutorial over at Cyclelicous. [caption id="attachment_1113" align="aligncenter" width="500" caption="Missing shortcut (walkway) for cyclists!? Just add it!"][/caption]

    Altering the Bike Route

    If you plan on biking in Alexandria, VA, and you suddenly crave frozen custards from The Dairy Godmother (my favorite!), simply drag the route to your desired location. Both the route and POI locations are draggable and can help you with all your last minute customization needs. [caption id="attachment_1118" align="aligncenter" width="500" caption="Customizing the route by dragging it farther south."][/caption]

    Printing Out Directions

    As expected, the SDK can return a narrative of the OSM directions which can then be used as a cue sheet for your ride. If you need to customize it further by drag-routing, no problem! The directions will also get updated automatically. [caption id="attachment_1127" align="aligncenter" width="500" caption="The directions update as the route gets dragged."][/caption] Also of note is when dragging the bike route, the algorithm is smart enough to only route you on a bike friendly path. For example, trying to drag your route on an interstate or areas where bicycle access is set to false in OSM will fail. As you can see, there's really no excuse now for you to not develop a savvy MapQuest application that spits out great bike routes... ok, so maybe there's always room for improvement! We already have other bike routing features in the works so please stay tuned. Thanks to everyone who's already provided feedback and the cycling community for embracing our services! And in case you're wondering, drag routing is also available for both driving and walking directions. Just make sure to add: ribbonOptions:{draggable:true,draggablepoi:true} Simple as that!