Link to Route Planner Developer's Guide

The Link to Route Planner Service provides a simple interface to prepopulate the Route Planner form with addresses and notes from any website or application.

Contents

Overview

Link to Route Planner supports four different methods of connecting to the Route Planner application. Using any of these methods you could have your website or application prepopulate the Route Planner application form with addresses and notes from your website or application.

Supported input formats:

  • JSON - All the route addresses and corresponding notes are supplied via JSON-formated text with key "json",through HTTP POST request.
  • XML - All the route addresses and corresponding notes are supplied via XML-formatted text with key "xml", through HTTP POST request.
  • CopyPaste - All route addresses are supplied as a single value corresponding to a key "copypaste" through HTTP POST request.
  • Key/Value pairs - All route addresses are supplied via request parameters through HTTP POST request , the key for each parameter will mentioned in the below section.

Common URL Parameters

Request Parameter Request Parameter Value Description
format json If format mentioned in the post url is json, all the route addresses and corresponding notes will be accepted via JSON-formated text with key "json"
xml If format mentioned in the post url is json, all the route addresses and corresponding notes will be accepted via XML-formated text with key "xml"
copypaste If format mentioned in the post url is 'copypaste', all the route addresses will be accepted in text format with key "copypaste"
form All route addresses are supplied via request parameters through HTTP POST request

Supported input formats Samples

JSON Format Sample

This is the recommended format to be used if your website or application has Routing addresses and notes that are not stored in a single form. You can programatically pull the addresses and notes and build a JSON object as specified and submit the same to the Route Planner Application as described below.

http://www.mapquest.com/routeplanner?format=json

Location 1: Note 1:
Location 2: Note 2:
Location 3: Note 3:

JSON TEXT

XML Format Sample

This is the recommended format to be used if your website or application has Routing addresses and notes that are not stored in a single form. You can programatically pull the addresses and notes and build a XML formatted string as specified and submit the same to the Route Planner Application as described below.

http://www.mapquest.com/routeplanner?format=xml

Location 1: Note 1:
Location 2: Note 2:
Location 3: Note 3:

XML TEXT

Copy Paste Format Sample

This is the easiest way in which you can connect to the Route Planner Application. In this method you can add a simple form to your website or application which has a single textarea where users can paste/enter addresses. Please note that you will have to inform the users that each address will have to be entered in a separate line. This method does not support notes for stops.

http://www.mapquest.com/routeplanner?format=copypaste

Form Format Sample

This is the standard format in which a key/value pair is sent as request parameters to the Route Planner Application. In this method you can add a simple form to your website or application which has separate input boxes for entering each address and corresponding notes.

http://www.mapquest.com/routeplanner?format=form



loc1, loc2,.....loc25 for adddressess

note1,note2,...note25 for corresponding notes

none|time|distance [eg: if shortest time is selected then value of "reorder" should be "time"]

highway, toll, seasonally closed [selected avoid option should be 1 else 0 eg: if avoid highways is selected , value for "highway" should be 1]

Location 1: Note 1:
Location 2: Note 2:
Location 3: Note 3:

  © MapQuest, Inc. All rights reserved.    Privacy Policy | Terms of Use