我有一个存储在数据库表中的lat lon坐标,我希望将它们显示在这样的mapview中:
region.center.latitude = place.lat;
region.center.longitude = place.lon;
lat和lon在表格中存储为双精度数。这是我得到的错误:
**error: incompatible types in assignment**
我希望有足够的信息继续下去。我想我得到了错误,因为它们是双打的,我使用错误的语法来显示它们。
非常感谢任何帮助
答案 0 :(得分:0)
这就是我解决问题的方法:
region.center.latitude = [place.lat floatValue];
region.center.longitude = [place.lon floatValue];