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 6337083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T19:11:06+00:00 2026-05-24T19:11:06+00:00

How do I get the latitude and longitude on the point where the user

  • 0

How do I get the latitude and longitude on the point where the user do a longhold(eg 2s)on the mapView.

I chanced upon a similar question : get coordinates on tap in iphone application

But I don’t understand how do I go about handling the touch event on the mapView.

What I intent to achieve it to drop a pin annotation to the location, do nesscary reverse geocoding via Google API and display it on the subtitle. So firstly, I would need to get the required coordinates.

Examples would be very much appreciated.

Thanks.

  • 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-05-24T19:11:07+00:00Added an answer on May 24, 2026 at 7:11 pm

    You can convert the coordinates of the touch in the view retrieved from the gesture to gps coordinates like this…

    - (void)mapLongPress:(UILongPressGestureRecognizer *)gestureRecognizer{
        if(gestureRecognizer.state == UIGestureRecognizerStateBegan){
            CGPoint touchLocation = [gestureRecognizer locationInView:mapView];
    
            CLLocationCoordinate2D coordinate;
            coordinate = [mapView convertPoint:touchLocation toCoordinateFromView:mapView];
        }
    }
    

    Note that in my example, I had the gesture applied to the mapView itself. You would have to pass the view to which you applied the gesture to toCoordinateFromView:mapView

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

Sidebar

Related Questions

Sometimes when trying to get the Latitude span or Longitude span of a mapview
My problem is to get the current latitude and longitude of the user. I
i need to get (somehow) the longitude/latitude of a user once they click on
how to get latitude and longitude for particular landmark/business, i would like to get
I am using following code to get current latitude and longitude. But none of
I've seen that it's possible to get the latitude and longitude (geocoding, like in
Using the Google Maps API, how can I get the latitude and longitude of
Is there any way to get the location of a cell phone (i.e. latitude/longitude)
When using a Location Manager to get a Location object containing Latitude and Longitude,
I would like to get country, region and city name from longitude and latitude

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.