在grid viev中为动态计算值添加列 [英] add column for dynamic computed values in grid viev
本文介绍了在grid viev中为动态计算值添加列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好..
i有一种算法可以找到地点之间的距离...算法从数据库中获取纬度和经度并计算该lat日志之间的距离..
假设A和B之间的距离= x1,B和C之间的距离= x2,C和D之间的距离= x3等等..
现在我的问题是如何添加这在网格视图中计算的距离为新列.. ???
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..???
推荐答案
这里有完整的解释: http://en.wikipedia.org/wiki/Haversine_formula [ ^ ]。
免责声明:我没有费心去查看这里的数学,它非常简单。很可能它是正确的。
编写代码时,您可能希望使用此页面在线测试您的计算: http://www.movable-type.co.uk/scripts/latlong.html [ ^ ]。
我也希望他们能正确地完成那些简单的计算。 :-)
祝你好运,
-SA
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
这篇关于在grid viev中为动态计算值添加列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文