//存进去
{
NSMutableArray *test = [[NSMutableArrayalloc]init];
CLLocationCoordinate2D cll1={39.932949,116.431734} ;
CLLocation *towerLocation = [[CLLocationalloc] initWithLatitude:cll1.latitudelongitude:cll1.longitude];
[testaddObject:towerLocation];
[towerLocationrelease];
CLLocationCoordinate2D cll2={39.917186,116.432469} ;
CLLocation *towerLocation1 = [[CLLocationalloc] initWithLatitude:cll2.latitudelongitude:cll2.longitude];
[testaddObject:towerLocation1];
[towerLocation1release];
CLLocationCoordinate2D cll3={39.917014,116.461139} ;
CLLocation *towerLocation2 = [[CLLocationalloc] initWithLatitude:cll3.latitudelongitude:cll3.longitude];
[testaddObject:towerLocation2];
[towerLocation2release];
}
//取出来
{
int count = [testcount];
CLLocationCoordinate2D Coords[count];
Position * pPositions =(Position *)malloc(sizeof(Position)*count);
for (int i=0; i<count; i++)
{
Coords[i]=[[pointsobjectAtIndex:i] coordinate];
pPositions[i].lat = Coords[i].latitude*3600000;
pPositions[i].lon = Coords[i].longitude*3600000;
}
}