Search code examples
javascriptmapquest

Mapquest AppKey not working


I am using Mapquest javascript Maps API for displaying optimized route. I am getting error when page is loading

I http://www.mapquestapi.com/sdk/js/v7.2.s/mqa.toolkit.js?key= Failed to load resource: the server responded with a status of 403 (Forbidden) Uncaught ReferenceError: MQA is not defined

My code was working fine but suddenly it's stopped working. I have registered again for new appkey but same problem.

When I am using http://open.mapquestapi.com only map is displaying,but route is not displaying (addOptimizedRoute function used for route) I have tried v7.2.s to v7.0.s but no result.


Solution

  • Free & Open AppKeys work with the MapQuest Free & Open APIs & SDKs. i.e., you're hitting the endpoint for the Enterprise Edition of the services, so your key won't work with anything hosted on www.mapquestapi.com. There were licensing changes announced late last year.

    You'll want to use the OSM/Open Data version of the JavaScript Maps API, located here: http://open.mapquestapi.com/sdk/js/v7.2.s/mqa.toolkit.js?key=YOUR-KEY-GOES-HERE