1
Vote

Issue retrieving coordinates and displaying the wrong data Chart Map 2.2.1

description

I noticed that UK address' are showing up in the US and the coordinates are in the display address. I went through the code and found the issue on line 72. There is this comment: "Using this loop we lose control of the order of elements in the array. Some browsers/versions may treat this differently. But so far seems ok."

What is happening, is the UK address' are different from the US. So it may only have a street address and a postcode. So when it pushes the data onto the address, it will only have four values in the array. The street address, postcode, latitude, and longitude. So instead of using the latitude and longitude, it searches the address again and also displays the coordinates because it uses the first five values of the array.

I hope that makes sense.

comments

wedge905 wrote May 22, 2015 at 10:05 PM

Make sure you change your default center coordinates and zoom level, so that the uk is initially displayed before any addresses start populating.

When the Bing map does a geocode, it defaults to searching in the currently displayed area of the map. So those default coordinates aren't just for display purposes, they can actually affect the quality of the search results.

If that doesn't work, then try using 3.x instead of 2.x, and see if you get better results.