Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我需要在 ios 上的谷歌地图上绘制一条折线,我在单独的数组中有纬度和经度,我想将它们收集到一个 CLLocationCoordinate2D 数组中,所以请帮助我编写制作这个集合的代码
CLLocationCoordinate2D *coords = malloc(coordinateCount * sizeof(CLLocationCoordinate2D)); for(size_t i = 0; i < coordinateCount; ++i) { coords[i].latitude = latitudes[i]; coords[i].longitude = longitudes[i]; } // ... Use the array ... free(coords);