Sebastian Schreiber
02/01/2024, 3:08 PMMichael Krussel
02/01/2024, 3:29 PMmemScope
to create a native array of the coordinates, and then call MKPolygon.polygonWithCoordinates()
Michael Krussel
02/01/2024, 3:30 PMSebastian Schreiber
02/01/2024, 3:45 PMMichael Krussel
02/01/2024, 3:46 PMSebastian Schreiber
02/02/2024, 9:31 AMfun createCPointer(coordinates: List<CLLocationCoordinate2D>): CPointer<CLLocationCoordinate2D> {
return memScoped {
val cPointer = allocArray<CLLocationCoordinate2D>(coordinates.size)
coordinates.forEachIndexed { index, clLocationCoordinate2D ->
cPointer[index] = clLocationCoordinate2D // <-- Not Possible. No setter.
}
cPointer
}
}
Any clue as to how I am using the CPointer wrong?Sebastian Schreiber
02/02/2024, 9:38 AMcPointer[index].latitude = clLocationCoordinate2D.latitude