次のコードを検討してください。
NSString * coordinateString = [NSString stringWithFormat:@"(%@,%@}", [inPoint objectAtIndex:0],[inPoint objectAtIndex:1]];
CLLocationCoordinate2D * myPoint= (__bridge CLLocationCoordinate2D *)(coordinateString);
私の質問は次のとおりです。この例では、
[inPoint objectAtIndex:0] and [inPoint objectAtIndex:0]
はそれぞれ 16.4006 と 38.254 です
myPoint の値をログに記録すると、"myPoint=(16.400583,38.254028}" が得られます。予想どおりですが、デバッグ パネルでは、myPoint は緯度 7304.....-304 で表されます。無限のゼロの経度。
これは内部表現ですか、それとも double から NSString から CLLocationCoordinate2D への変換で失われたものですか?