calculate km from source to destination using lat n long
I want calculate distance in km from source to destination using latitude and longitude in mvc
Please help me
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Manoj BhoirPosted Apr 28, 2019, 1:52 AM
var sCoord = new GeoCoordinate(sLatitude, sLongitude);
var eCoord = new GeoCoordinate(eLatitude, eLongitude);
return sCoord.GetDistanceTo(eCoord);
The distance is in meters.
You need to reference System.Device.
Amit KumarPosted Apr 27, 2019, 11:42 PM