partial #1033 - fixed the bug with position

This commit is contained in:
Daniel Camargo 2013-05-01 12:27:18 -03:00
parent 455fcad278
commit e071d04ea9

View File

@ -343,8 +343,8 @@ App.loc = {
var distances = [];
var closest = -1;
for( i=0;i<results.length; i++ ) {
var alat = results[i].geometry.location.lat;
var alng = results[i].geometry.location.lng;
var alat = results[i].geometry.location.lat();
var alng = results[i].geometry.location.lng();
var dLat = _toRad( alat - lat );
var dLong = _toRad( alng - lng );
var a = Math.sin( dLat / 2 ) * Math.sin( dLat / 2 ) +