mapquest

Single Line Address for MapQuest


I'm trying to provide other map options besides just Google. Unfortunately a single HTTP query (e.g. location=123+main+street) only seems to be readily supported by Google.

I had no luck trying to find anything about embedding in the documentation and decided to email them directly:

The MapQuest business products (https://developer.mapquest.com/documentation/) support both single line input "location=1555+Blake+St+Denver+CO+80202+US" and the advanced, 5-box method ("street=1555+Blake+St&city=Denver&state=CO&postalCode=80202&country=US"). Our API and SDK also lets you add the mapping/geocoding/routing functions to your site without embedding links to the consumer site at www.MapQuest.com.

Okay, so location=123+main+street should be supported in theory. However no example was provided. So using the iframe URL from the more client-oriented approach I tried the following without luck:

https://www.mapquest.com/embed/?location=1555+Blake+St+Denver+CO+80202+US

That just shows the map of the US as a whole.

How do I get the single HTTP query location to work for MapQuest embedding?

Correct: location=1555+Blake+St+Denver+CO+80202+US (single HTTP query).

Incorrect: street=1555+Blake+St&city=Denver (multiple HTTP queries).


Solution

    1. On this page: https://developer.mapquest.com/documentation/tools/link-to-mapquest/

    2. Scroll down to Link to MapQuest Wizard.

    3. Click on Map a Location.

    4. Click on Single Line Location.

    5. Click on the Run Sample with Embed View Specifier button.

    6. Copy the URL from the new tab.

    An example of the working MapQuest single HTTP query embedded page:

    https://www.mapquest.com/embed/search/results?query=1555%20Blake%20St%20Denver%20CO%2080202&centerOnResults=1