Click here to Skip to main content
16,008,010 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello..
i have one algorithm to find distance between places...algorithm take latitude and longitude from database and compute distance between that lat log..
suppose distance between A and B = x1 , between B and C=x2 ,between C and D=x3 and so on..

Now my question is that how to add this computed distances in grid view as new column..???
Posted
Comments
Sergey Alexandrovich Kryukov 16-Mar-13 21:21pm    
What did you try?
—SA

1 solution

This is fully explained here: http://en.wikipedia.org/wiki/Haversine_formula[^].

Disclaimer: I did not bother to check up the mathematics here, it is very simple. Most likely it's correct.

When you write the code, you may want to test your calculations on-line using this page: http://www.movable-type.co.uk/scripts/latlong.html[^].

I also hope that they did those simple calculation correctly. :-)

Good luck,
—SA
 
Share this answer
 
Comments
Member 9332883 18-Mar-13 3:38am    
thns for answer...
i already have algorithm that find distance between two places...
but my question is that how to add column for this distances on grid view ???
Sergey Alexandrovich Kryukov 18-Mar-13 10:07am    
You asked for both, it looks like. What, you don't know what to do with your own grid view..? Why can't you do it? Any particular problem?
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900