簡體   English   中英

從不兼容的類型id_nullable分配給cllocationdegrees('aka double')

[英]Assigning to cllocationdegrees ('aka double') from incompatible type id_nullable

NSString* lat,*longi; 
lat= [[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"];

NSLog(@"LATITUDE %@",lat); longi= [[deliveryInfo objectAtIndex:0]valueForKey:@"longitude"]; 

c.latitude=[[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"]; 

c.longitude=-74.0565298; sp.latitudeDelta=0.01f; sp.longitudeDelta=0.01f; 

re.center=c; re.span=sp; mapView.region=re; MKPointAnnotation *p=[[MKPointAnnotation alloc]init]; 

p.coordinate=c; [p setTitle:@"USA"]; 

[p setSubtitle:@"Location"]; [mapView addAnnotation:p];
c.latitude=[[[deliveryInfo objectAtIndex:0]valueForKey:@"latitude"] floatValue]; c.longitude=[[[deliveryInfo objectAtIndex:0]valueForKey:@"longitude"]floatValue]; 
 sp.latitudeDelta=0.01f;
    sp.longitudeDelta=0.01f;
    re.center=c;
    re.span=sp;
    mapView.region=re;

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM