TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Resmi Satish
NA
110
75.2k
Calculate distance using GetDistanceTo for GeoCoordinate
May 29 2014 6:30 AM
I have to calculate the distance between 2 places using latitude and longitude.
Here I am calculating distance between Delhi and Gurgaon.
refer :http://www.mapcrow.info/Distance_between_Delhi_IN_and_Gurgaon_IN.html
using System.Device.Location;
{
GeoCoordinate distanceFrom=new GeoCoordinate();
GeoCoordinate distanceTo=new GeoCoordinate();
distanceFrom.Latitude = 77.2167;
distanceFrom.Longitude = -28.6667;
distanceTo.Latitude = 77.0333;
distanceTo.Longitude = -28.4667;
double distance = distanceFrom.GetDistanceTo(distanceTo);
}
However I don't know in what unit the value is return(kilometer or miles).
And also I am not sure whether the value return is correct or not.
Please help me to sort out the issue.
Reply
Answers (
3
)
Regular Expression is urgent
Operation is not allowed when the object is closed.