Question

I'm looking for a simple way to bring up a MapQuest map with something like:

http://mkapquestapi.com?address=123 Mapel St. Mytown, CA&diameter=20 miles

All the MapQuest documentation I've found tries to put me through hundreds of pages that do much more than I want.

I came across the example below in another StackOverflow question:

 $.ajax({
    url: "http://www.mapquestapi.com/geocoding/v1/address?key=",
    dataType: 'json',
    type: 'POST',
    contentType:'json',
    data: {location: { "postalCode": "98765"}, options: { thumbMaps: false} },
    success: function(data) { log( data ) },
    error: function(data) { log( 'error occurred - ' + zipCode + ' - ' + data ) }
});

I could handle something like that if someone could point me to where MapQuest explains what it wants in the parameters.

Thanks for any help.

Était-ce utile?

La solution

So you want to open MapQuest with an address, rather than lat/long coordinates?

The parameter options are defined in the MapQuest geocoding parameters section. Try this:

http://www.mapquestapi.com/geocoding/#parameters

Autres conseils

Disclaimer: I work at MapQuest.

What exactly are you looking to do --- are you looking to generate an image of a map with an address marked on it?

If so, you can use the Static Map API. Here's an example: http://www.mapquestapi.com/staticmap/v4/getplacemap?key=YOUR_KEY_HERE&location=1555 Blake St, Denver, CO&size=400,200&type=map&zoom=13&imagetype=jpeg&showicon=red_1-1

More documentation is here: http://www.mapquestapi.com/staticmap/

If you are looking to make a link that opens MapQuest.com and displays an address, you can link to it this way: http://mapq.st/map?q=1555 Blake St Denver CO 80202&maptype=map

More documentation is here: http://www.mapquestapi.com/link-to-mapquest/

Let me know if this helps. Sounds like you're looking for a map or a map image and not a geocoding result.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top