c# - Mapquest: This key is not authorized for this service -
i trying use geocoding.net reverse geocode latitude , longitude formatted address. want address mapquest , not other providers yahoo, google , bing. code:
try { igeocoder geocoder = new mapquestgeocoder("fmjtd%7cluu82q6***********"); var addresses = geocoder.reversegeocode(latitude, longitude); return ("formatted address : " + addresses.first().formattedaddress); } catch (exception exception) { return exception.message; }
this code catches exception , thorws error "this key not authorized service."
i know error occurs when try hit enterprise api of geocoder i.e http://www.mapquestapi.com/geocoding/v1/reverse?key=*******************
for free , open source usage, should hit api:
http://open.mapquestapi.com/geocoding/v1/address?key=your-key-here
how can this? there option of passing post url in constructor itself? or other way?
scanning on open-source code of geocoding.net, looks need set "useosm" property of geocoder object true:
geocoder.useosm = true;