I have noticed that my geocoder is inconsistent in the code shown below because before the ‘getLatLng’ method is called I show 10 valid locations, but after this line of code the number of points that actually show up is different each time I search (same search criteria – fyi) Between 5 and 10 at random .. very strange
Anyone have issues similar to this? If so how did you solve them?
geocoder = new GClientGeocoder(); geocoder.getLatLng(address, function(point) { if (point) { var icon = new GIcon(); var marker = new GMarker(point, { icon: icon }); GEvent.addListener(marker, 'click', function() { marker.openInfoWindowHtml(html); }); map.addOverlay(marker);
I actually found that it wasn’t the ‘verify address’ code that was causing this inconsistency, but instead – just the fact that the maps api didn’t want a ton of geocoder calls so I added a simple 225ms timeout between each request and this did the trick