Incorrect lat & lng

6 posts / 0 new
Last post
DanielBD
Incorrect lat & lng

Hey!

I've got this response from a geocoding request:

{"info":{"statuscode":0,"copyright":{"text":"\u00A9 2019 MapQuest, Inc.","imageUrl":"http://api.mqcdn.com/res/mqlogo.gif","imageAltText":"\u00A9 2019 MapQuest, Inc."},"messages":[]},"options":{"maxResults":-1,"thumbMaps":true,"ignoreLatLngInput":false},"results":[{"providedLocation":{"location":"6720 Szeged Tisza Lajos krt 40"},"locations":[{"street":"","adminArea6":"","adminArea6Type":"Neighborhood","adminArea5":"Szeged","adminArea5Type":"City","adminArea4":"Csongr\u00E1d","adminArea4Type":"County","adminArea3":"","adminArea3Type":"State","adminArea1":"HU","adminArea1Type":"Country","postalCode":"","geocodeQualityCode":"A5XAX",
"geocodeQuality":"CITY","dragPoint":false,"sideOfStreet":"N","linkId":"0","unknownInput":"","type":"s","latLng":{"lat":46.254631,"lng":20.148602},"displayLatLng":{"lat":46.254631,"lng":20.148602},"mapUrl":"http://www.mapquestapi.com/staticmap/v5/map?key=xxxxxxxxxxxxxxxxxxxxxx&type=map&size=225,160&locations=46.2546312,20.1486016|marker-sm-50318A-1&scalebar=true&zoom=12&rand=-910802785"}]}]}

 

The problem is the results are:

"lat":46.254631,"lng":20.148602

These coordinates are not correct.

 

Te correct one is found in the mapUrl field:

&locations=46.2546312,20.1486016

 

I think the problem is rounding related. Use a 7 digit rounding instead of 6.

 

"lat":46.2546312,"lng":20.1486016

 


MQBrianCoakley
The six decimal place
The six decimal place location is correct and expected. The seven decimal place location is unusual but not unexpected.

DanielBD
Check this:

Check this:

"location":"6720 Szeged Tisza Lajos krt. 40" Result: "lat":46.254631,"lng":20.148602 result in mapURL: locations=46.2546312,20.1486016
"location":"6722 Szeged Boldogasszony sgt. 21" Result: "lat":46.254631,"lng":20.148602 result in mapURL: locations=46.2546312,20.1486016

For some reason they are identical. When I search these adressess on mapquest.com the results are 100% correct. The 2 address are 0.9 miles from each other.

 


MQBrianCoakley
These addresses have been
These addresses have been sent on to the development team to assess. Thanks for the information.

DanielBD
Any progress on this issue?

Any progress on this issue? The results are still the same for both adresses.


MQBrianCoakley
Nope, no news yet.
Nope, no news yet.