0
我试图计算使用下面的代码保存位置初始值和newlocation的statringpoint之间的距离,但我得到的距离为null。谁能帮我这个得到iphone上的两个位置之间的距离
CLLocationDistance distance = [newLocation getDistanceFrom:startingPoint];
我试图计算使用下面的代码保存位置初始值和newlocation的statringpoint之间的距离,但我得到的距离为null。谁能帮我这个得到iphone上的两个位置之间的距离
CLLocationDistance distance = [newLocation getDistanceFrom:startingPoint];
你的代码应该工作。也许起点是无?
是newLocation和startingPoint两者的类型:CLLocation *? – 2009-08-03 11:20:04