Sólo una pregunta rápida sobre Core Location, Estoy tratando de calcular la distancia entre dos puntos, el código es el siguiente:distanceFromLocation - Calcular la distancia entre dos puntos
-(void)locationChange:(CLLocation *)newLocation:(CLLocation *)oldLocation
{
// Configure the new event with information from the location.
CLLocationCoordinate2D newCoordinate = [newLocation coordinate];
CLLocationCoordinate2D oldCoordinate = [oldLocation coordinate];
CLLocationDistance kilometers = [newCoordinate distanceFromLocation:oldCoordinate]/1000; // Error ocurring here.
CLLocationDistance meters = [newCoordinate distanceFromLocation:oldCoordinate]; // Error ocurring here.
}
Estoy recibiendo el siguiente error en el últimos dos líneas:
error: cannot convert to a pointer type
he estado buscando Google, pero no puedo encontrar nada.
y también mantener en mi mente "Este método mide la distancia entre los dos lugares al trazar una línea entre los que sigue la curvatura de la Tierra" documentos de manzana. Entonces esto no dará la distancia por carretera. –
¿cómo se puede encontrar la distancia por carretera? @deanWombourne – Dalvik
@AnkitSrivastava ¿cómo puedo encontrar la distancia por carretera? – Dalvik