Traffic API

GET
Flow Image

The Flow Request returns an image of the current traffic for a particular area.

Resource URL

http://www.mapquestapi.com/traffic/v2/flow

Resource Information

Response Formats GIF, PNG
Authentication Yes (Requires Key)
Rate Limited Yes

Request Parameters

  • key required

    The API Key, which is needed to make requests to MapQuest services.

  • mapState required

    A valid map state for this image.

    This parameter must contain the following information:

    • width - width of the image in pixels
    • height - height of the image in pixels
    • center - lat/lng object of the map center
    • scale - map scale

    The scale must be one of the following values:

    Zoom Scale
    10 433343
    11 216671
    12 108335
    13 54167
    14 27083
    15 13541
    16 6770
    17 3385
    18 1692

    Supply the following query parameters to describe the mapState:

    • mapWidth
    • mapHeight
    • mapLat
    • mapLng
    • mapScale
  • imageType optional, defaults to gif

    The format of the image. Can be gif or png.

Example Request

GET

https://www.mapquestapi.com/traffic/v2/flow?key=KEY&mapLat=38.890763&mapLng=-77.084755&mapHeight=400&mapWidth=400&mapScale=108335

Example Response (Flow Image)

The following sample returns a 400x400 pixel image centered on Arlington, VA, with a scale of 108335 (zoom level of 10)