我尝试分配这样的值,其中coffeshop是一个纬度为字符串变量的对象,但坐标值显示0值,而我nslog coffeeshop.latitude和经度我得到正确的值,是否有任何错误这次转换
CLLocationCoordinate2D coordinate;
coordinate.latitude=[coffeeshop.latitude doubleValue];
coordinate.longitude=[coffeeshop.latitude doubleValue];
答案 0 :(得分:1)
您好
我确定这是一个文化问题
你必须检查你的字符串格式
我得到了同样的错误导致我的String约束昏迷分隔符而不是点。
尝试在字符串