objective c - Iphone CLLocationCoordinate2D -
i new @ iphone , have problem.
i have code
for (int i=0; i<2; i++) { datos *datos = (datos *)[arr_datos objectatindex:i]; cllocationcoordinate2d coord; annotationitem *annotationitem = [[annotationitem alloc] init]; coord.latitude =[datos.latitud doublevalue]; coord.longitude = [datos.longitud doublevalue]; nslog(@"coord %f",coord.longitude); nslog(@"coord %f",coord.latitude); [annotationitem setcoordinate:coord]; //[annotationitem setestacion:estacion]; [mapview_ addannotation:annotationitem]; [annotationitem release]; }
the problem doesn't done anything
but if change coord.latitude=40.444
, coord.longitude=-3.700;
this gives me want, don't want this, because have array many latitudes , longitudes. can me this? when put coord.longitude=[datos.longitude floatvalue];
, doesn't work?
i'm using xcode 3.2.2
thanks , forgive me english.
the problem had change values, putting wrong values. have change
coord.latitude =[datos.longitud doublevalue]; coord.longitude = [datos.latitud doublevalue];
thank time.
Comments
Post a Comment