Problem with LatLng object

3 posts / 0 new
Last post
DragonOsman
Problem with LatLng object

I wanted to use MapQuest's Reverse Geocoding API because in my application, when I tried to reverse geocode Kosovo, Western Sahara or Wake Island using Google's Reverse Geocoder, I got "ZERO_RESULTS" (meaning I have an empty JSON object).  My plan was to use MapQuest's API for only those three places since Google's one works for all of the other places.  I put my JS code in this Gist: https://gist.github.com/DragonOsman/c6e8fb15343544e662f474c5a526d1c2 .  I have an error in mapquest.js line 10 (in the pretty-printed version it's line 199) that says: 

Uncaught Error: Invalid LatLng object: (function(){return a}, function(){return b})
    at new A (mapquest.js:10)
    at Object.P [as latLng] (mapquest.js:10)
    at n (mapquest.js:10)
    at t.value (mapquest.js:10)
    at t.value (mapquest.js:10)
    at XMLHttpRequest.xreq3.onload (scripts.js:1209)

My LatLng object is valid for Google's API.  I passed it into the function "fill_info_window()" from "init_map()".  I tried to use it in "L.mapquest.geocoding().reverse()", but then I got this error.  What should I do?  Is there something like an "L.mapquest.LatLng" object I can initialize with the LatLng coordinates in "location" before getting to the else clause on line 1196?

Note: I'm new to MapQuest.  

Thanks in advance for any replies and/or help.


MQBrianCoakley
What is the latLng being sent
What is the latLng being sent to the reverse geocoder?

Thomas.Horacek
Here is the documentation on
Here is the documentation on the various formatting for lat lng objects in the geocoder https://developer.mapquest.com/documentation/mapquest-js/v1.3/l-mapquest...