سلام خدمت اساتید محترم
سوالی که برام پیش اومده اینه که در فیلم این جلسه استاد آوند عزیز به راحتی به لوکیشن دقیق خودشون دسترسی پیدا میکنند ولی من با وجود اینکه کدم مشکلی نداره و اجرا هم میشه لوکیشنم اشتباهه در کمال تعجب فاصله لوکیشن منو همونطور که از عکس قابل مشاهدست از تهران حساب میکنه (من ساکن شمال هستم) حتی زوم رو هم درست اعمال نمیکنه (defaultZoom : 17) :
var currentPosition , currentAccuracy ; map.on('locationfound', function(e){ if(currentPosition){ map.removeLayer(currentPosition); map.removeLayer(currentAccuracy); } var radius = e.accuracy; currentPosition = L.marker(e.latlng).addTo(map) .bindPopup("you are within " + radius + " meters from this point").openPopup(); currentAccuracy = L.circle(e.latlng).addTo(map); }); map.on('locationerror',function(e){ alert(e.message); }); function locate(){ map.locate({ setView: true , maxZoom: defaultZoom}); } setInterval(locate, 5000);