我已经成功地从 xml 文件中获得了注释:
double realLatitude = [[[anns objectAtIndex:i] objectForKey:@"Latitude"] doubleValue];
double realLongitude = [[[anns objectAtIndex:i] objectForKey:@"Longitude"] doubleValue];
MyAnnotation *myAnnotation = [[MyAnnotation alloc] init];
CLLocationCoordinate2D theCoordinate;
theCoordinate.latitude = realLatitude;
theCoordinate.longitude = realLongitude;
myAnnotation.coordinate=CLLocationCoordinate2DMake(realLatitude,realLongitude);
xml 文件如下所示:
<key>Latitude</key>
<string>60.490275</string>
<key>Longitude</key>
<string>22.255962</string>
但现在我有一个大的坐标点列表,如下所示:
<key>Coordinates</key>
<string>27.864849695000,70.080733147000</string>
我需要改变我的代码工作吗?谢谢!