xcode - MKmapview - CLLocationCoordinate2D -


i have array nsmutablearray save mkuserlocation type - locationarray. anyway want data array , save array type cllocationcoordinate2d. since save in locationarray id type how can coordinates , save second array?

  cllocationcoordinate2d* coordrec = malloc(pathlength * sizeof(cllocationcoordinate2d));     for(id object in locationarray){         (int = 0; < pathlength; i++)             ????? 

i dont know if possible!

thanks

why need c-style array of cllocationcoordinate2d objects?

here go:

nsarray* userlocations; // contains mkuserlocation objects...  cllocationcoordinate2d* coordinates = malloc( userlocations.count * sizeof( cllocationcoordinate2d) );  ( int = 0 ; < userlocations.count ; i++ ) {     coordinates[i] = [[[userlocations objectatindex: i] location] coordinate]; } 

Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -