Part of the Core Location Data Types. This is a distance measurement (in meters) from an existing location.
Questions tagged [cllocationdistance]
77 questions
1
vote
0 answers
CLLocation Change in local update database
I have local database which has the field "distance" which is based on user's current location.
so i have added a logic to update database if there is change in location for every 30sec.
If there is change in the location one time in 30 sec its…

sKhan
- 9,694
- 16
- 55
- 53
1
vote
2 answers
How to find out that whether a point on a map is within a radius from user's present location on iOS?
I am new to iOS and I have to make an application in which the the user will know its present location and will enter a value in Kilometers and I have to find out that whether another given pair of latitude and longitude (which give a location on…

MK Singh
- 706
- 1
- 13
- 36
1
vote
1 answer
CLLocation Current Location get Location
I have seen many currentLocation questions here but I am trying to set two points using two seperate IBActions because from my understanding the Core Location updateLocation method can't measure distance between two points that the user chooses. For…

Ali Rahman
- 161
- 1
- 10
1
vote
2 answers
How to track location coordinates continuously and find the distance using start and stop UIButtons
I am new to objective c. My program is when start button is pressed, the location coordinates should start tracking and the distance should get tracked simultaneously and when stop button is pressed, the the tracking should stop and the distance…

Sharanya
- 311
- 1
- 2
- 10
0
votes
4 answers
calculate distance between 2 coordinates iphone - best practice
I'm finishing an App in wish i need to show the user the distance between him and about 500 coordinates.
using the CLLocation method to calculate it, works well, but it takes about 1 minute in iPhone 4 to finish calculations for each location.
What…

Rui Lopes
- 2,562
- 6
- 34
- 49
0
votes
2 answers
GPS get the longitude and elevation separately
i use this code to get gps data
- (void)locationUpdate:(CLLocation *)location {
locLabel.text = [location description];
}
the result look like this
<+38.76856432, +11.99454301> +/- 100.00m (speed ......)
when i trie this i have an error,
-…

user567
- 3,712
- 9
- 47
- 80
0
votes
2 answers
How to calculate distance and time between two CLLocation throughout the whole ride with CloudMade maps?
In my iPhone application I allow the user to choose a destination on the map, then when he starts driving toward the destination I want to give him information like: how long until he reaches the destination and what its current distance from the…

Eyal
- 10,777
- 18
- 78
- 130
0
votes
0 answers
How to use transformColumn on dataframe
I am currently making an application in Xcode, and I have a dataframe with a column of CLLocations. I want to make a function that takes a CLLocation as an input, and find the ten closest location rows.
In my code below, convert is a dataframe with…

Linda Xue
- 21
- 4
0
votes
1 answer
Add some calculation to CLLocationDistance
Here is my problem I can print in console double value (aka the distance) but I can't take a double and add the distance in a table view for exemple.
if previousLocation == nil {
previousLocation = locations.first
} else {
…

Giovanni Gaffé
- 36
- 1
- 1
- 10
0
votes
1 answer
Comparing two instances of CLLocationDistance to fid the smaller one
Hi I have an array of mapAnnotations in my app. Each annotation object has an address and a coordinate. I am using my location manager to find out the user's current location which is a CLLocationDistance object. Then I am trying to iterate over the…

banditKing
- 9,405
- 28
- 100
- 157
0
votes
1 answer
Finding the distance between current location and another location (Swift 5)
I'm not a programmer but have been playing around with a side project for fun. I'm using Xcode 10, Swift 5. I've pieced together a handful of things through youtube and SO but I've searched and experimented with this for three days and I'm running…

Brad C
- 13
- 5
0
votes
1 answer
Find closest longitude and latitude in array from user location and Sorting array corresponding to shortest distance from one to another lat long
I have an Array with lat long and I want to sort array like dijkstra algorithm (to find the shortest distance from one to another location)
for i in 0..<(dataArray - 1) {
let coordinate1 = CLLocation(latitude: (dataArray[i] as…

Inderpal Singh
- 1,229
- 2
- 10
- 13
0
votes
1 answer
Display the distance from user with mapKit Swift (miles/km)
I have been attempting to display the distance on a tableView but I am unable to get it to happen. This question follows up from this question: CLLocationDistance conversion. I have checked the distance. Using this function in my Location class:
//…

Chace
- 561
- 10
- 28
0
votes
2 answers
Distance from Current Location to Annotation. (Firebase)
I want to have a the distance from my Currentlocation to a annotation that's in the FireData Base. I tried to make it word but i can't ;(. I would like to have the distance between the two locations in a var. I hope you guys can help me.
func…

Dani Kemper
- 343
- 2
- 10
0
votes
0 answers
Swift Firebase - Sort Array By Distance from User
I am trying to sort my places by distance from the user. I know how to accomplish this with MKMapItems, yet with my firebase call setup I am unsure how to accomplish this. I have been trying to follow this answer: Swift - Sorting by Nearest Location…

Lukas Bimba
- 817
- 14
- 35