Part of the Core Location Data Types. This is a distance measurement (in meters) from an existing location.
Questions tagged [cllocationdistance]
77 questions
0
votes
1 answer
iOS CLLocation Order In Which Code is Run
I have managed to get the co-ordinates for 2 cities using GLGeocoder geocodeAddressString
Having retrieved this 2 city co-ordinates from their names, I want to calculate the distance between them. However Im facing an issue in that the…

userMod2
- 8,312
- 13
- 63
- 115
0
votes
2 answers
Wrong distance between two lat long
I wants to get distance between two locations. I am getting latitude and longitude of two locations using below code
-(void)getLatLongOfLoac:(NSString *)locStr{
locStr = [locStr stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];
…

287986
- 93
- 1
- 12
0
votes
3 answers
Mapkit and didUpdateToLocation - calculating distance accuracy on iOS
I've made an application calculating distance when walking / running for iPhone.
I've compared my application to other running application, and no one gives the same distance.
Nike GPS : 2.1 Km
Runtastic : 2.5 Km
My App : 2.9 Km
Here the routing to…

Nicolas Malinconico
- 19
- 3
0
votes
2 answers
Distance between CLLocations won't return correctly
In my app, I'm trying to get the distance between two locations. I pressed my app's button, walked across the (big) room, and the CLLocationDistance returned as 0.000000.
.h file:
@property (strong, nonatomic) IBOutlet UIImageView…

javadog36
- 3,025
- 2
- 13
- 7
0
votes
1 answer
getting driving distance in iOS
Im using the built-in Apple maps Framework in my iOS app.For some reason it returns the geometrical distance in miles and not the driving distance.Is there any way to get the driving distance in Apple maps or even in google maps?

Parth Mody
- 438
- 1
- 5
- 17
0
votes
0 answers
How to find the distance between two locations using Apple maps in iOS 6?
My requirement is to find the distance in miles between two locations without using the Google API.
I added code as:
CLLocation* first = [[CLLocation alloc] initWithLatitude:35.779702 longitude:-78.641746];
CLLocation* second = [[CLLocation alloc]…

rani
- 593
- 3
- 10
- 28
0
votes
1 answer
how can i convert NSNumber to CLLocationDistance?
I have to convert an NSNumber to CLLocationDistance for comparing them. So are there any formatter to do that? I searched at internet but i could not find.

user2393702
- 109
- 2
- 8
0
votes
1 answer
signal SIGABRT, when trying to get distance to annotations
I'm trying to calulate the distance between the userLocation and my annotations (from plist), But every time im run the mapView im getting signal SIGABRT error.
I'm doing the calculate in my mapViewController.m and want to show the calculated values…

hpetersen
- 11
- 3
0
votes
3 answers
CLLocationDistance returns totally wrong values
I am using this function to get the distance from one CLLocation to another
here venue.lat is NSNumber
GeoAddress *address = [[GeoAddress new] init];
CLLocationCoordinate2D coord;
coord.longitude = (CLLocationDegrees)[venue.lat…

Stpn
- 6,202
- 7
- 47
- 94
0
votes
2 answers
Getting different result from google distance API and native Distance finding function +iphone
I am working on iphone application where i need to find the points between 2 latitude and longitude
I had used:-
CLLocation* newlocation = [[CLLocation alloc] initWithLatitude:19.0759837 longitude:72.8776559];
CLLocation* oldLocation = [[CLLocation…

ios developer
- 3,363
- 3
- 51
- 111
0
votes
0 answers
Looking to draw line between two dynamically selected points in mapkit
I am working on an app that would draw a "route" between two points on a lake that will be dynamically selected from annotations on the map. I've looked to see if anyone has tried to do this, and I haven't found an answer to this question. If you…

Stan Cromlish
- 483
- 5
- 10
0
votes
1 answer
problems converting data in cllocationdistance
Im trying to add to a mutable array and can not figure this out. Throws error for incompatable data types double to id. question is how do i convert distance and store it in my array.
for (int i = 0; i < _getAllLocations.count; i++) {
uscInfo…

charlie johnston
- 67
- 2
- 8
0
votes
2 answers
how to rearrange tableview after i get min location from current location in iphone sdk?
i have created an application which show data from user current location.
I want to sort them in assending order on the base of minimum distance found of the user.
I know that i need to use this kind of function:
[userLocationd…

Hrushikesh Betai
- 2,227
- 5
- 33
- 63
-1
votes
1 answer
Determine distance on travelled path mkmapview swift
I have a functionality where user travels by his car from start to end location.
I need to calculate the distance between the start and end locations on which the user has travelled. There may be multiple routes to the destination and I am getting…

Roshni
- 153
- 2
- 14
-1
votes
2 answers
Value of distance between 2 CLLocation points does not appear on label text
I am trying to calculate the distance from the starting position I am (when i first start the app) to the current position and present it on a label (meters.text) but nothing appears on it..
Here is my code:
import UIKit
import CoreLocation
class…

George_th
- 79
- 1
- 1
- 5