开发者

Mapview lat lon co-ordinates - incompatible types in assignment

I have lat lon coordinates stored in a database table and I want to have them displayed in a mapview like this:

region.center.latitude = place.lat;
region.cent开发者_如何学Cer.longitude = place.lon;

the lat and lon are stored as doubles in the table. this is the error I'm getting:

**error: incompatible types in assignment**

I hope that's enough info to go on. I think I'm getting the error because they are doubles and I'm using the wrong syntax to display them.

thanks so much for any help


This was how I solved the problem:

region.center.latitude = [place.lat floatValue];
region.center.longitude = [place.lon floatValue];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜