简体   繁体   English

将字符串转换为CLLocationCoordinate2D

[英]Convert string to CLLocationCoordinate2D

I have an array with NSString's in it. 我有一个包含NSString的数组。 Some of these are latitude and longitudes and I need to use this with the below code. 其中一些是纬度和经度,我需要使用以下代码。

The latText and lonText are my strings that I am trying to use as co-ordinates.... latText和lonText是我的字符串,我试图用作坐标....

   CLLocationCoordinate2D pinlocation=mapView.userLocation.coordinate;

    pinlocation.latitude = latText;

    pinlocation.longitude  =lonText;
pinlocation.latitude = [latText doubleValue];

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM