This week's book giveaway is in the General Computing forum.
We're giving away four copies of Emmy in the Key of Code and have Aimee Lucido on-line!
See this thread for details.
Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

How to get one instance of a person's latitude/longitude position, without getting constant updates?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a very basic question that is throwing me off right now. I want to get the user's location (i.e. current lat/lon co-ordinates) to be used to check against a sqlite database of location co-ordinates, and find the nearest ones. I am looking at the CLLocation class, but from what I can tell, I would use this class to get regular updates to the user's movement change which I don't need. I want to get the user's current latitude and longitude position, and based on that, determine what locations in the database are closest. How would I do this?

Thanks again for your time and help!

Sincerely;
Fayyaz
 
Ranch Hand
Posts: 471
Mac OS X Hibernate Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CLLocationManager has a startUpdatingLocation and a stopUpdatingLocation. Check out the class reference, the sample code (links in the class reference) and this tutorial.
 
A wop bop a lu bop a womp bam boom! Tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!