Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7896227
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T07:50:22+00:00 2026-06-03T07:50:22+00:00

i have never worked with MKMapView or CoreLocation before so I need some help.

  • 0

i have never worked with MKMapView or CoreLocation before so I need some help.
I want to get my current position (maybe show this position in a mapView) and update my position periodically and compare my new and old position every time to see if i have moved.

Is something like this possible? How can I do this? I have already implemented a MKMapView. But I am not sure how I could get my current position and make a comparison to see if i am moving…

Thanks for any help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T07:50:24+00:00Added an answer on June 3, 2026 at 7:50 am

    This is pretty simple. Set showsUserLocation to YES and you’re done. docs

    To make it a little nicer you can center the MKMapView every time the position changes. See here how to do it.

    If you want to know if you have moved, you should store the most recent position in a property and then in the delegate method mapView:didUpdateUserLocation: check if the new location is different from the last location.

    @property (assign, nonatomic) CLLocationCoordinate2D locationCoordinate;
    ...
    @synthesize locationCoordinate = _locationCoordinate;
    
    - (void)viewDidLoad
    {
        [super viewDidLoad];
        self.mapView.delegate = self;
    }
    
    - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation
    {
        if (userLocation.coordinate.latitude != self.locationCoordinate.latitude ||
            userLocation.coordinate.longitude != self.locationCoordinate.longitude) {
            // We moved
        }
        self.locationCoordinate = userLocation.coordinate;
    }
    

    I’m actually not sure if the delegate method is only called when the userLocation has changed. In that case you don’t have to store the location as a property and do the check, just implement the delegate method and do your stuff there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have inherited a SSIS project. I have never worked with SSIS before, and
I have just arrived at new company and have never worked with Qt before,
I'm fairly new to GWT and have never worked with Java Servlets before. I
I'm currently working with MVC 1.0 and have never worked with AJAX before and
I have never worked on flash but am trying to make some additions to
I have never worked on jquery but after some googling and learning I have
I have never worked on programming languages before. I am learning C and unix
I have never worked with json before. I am trying: http://api.worldbank.org//topics?format=JSON and make things
I have never worked with web cams in VB.net before. Would anyone be able
The Documentation from facebook isn't understandable, atleast for me. I have never worked before

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.