Questions tagged [mkuserlocation]

The MKUserLocation class defines a specific type of annotation that identifies the user’s current location.

The MKUserLocation class defines a specific type of annotation that identifies the user’s current location. You do not create instances of this class directly. Instead, you retrieve an existing MKUserLocation object from the userLocation property of the map view displayed in your application.

In iOS 5.1 and earlier, the Map Kit framework uses the Google Mobile Maps (GMM) service to provide map data. Use of specific classes of this framework (and their associated interfaces) is subject to the Google Mobile Maps terms of service. You can find these terms of service at http://code.google.com/apis/maps/iphone/terms.html.

Home page: https://developer.apple.com/library/ios/documentation/MapKit/Reference/MKUserLocation_Class/Reference/Reference.html

38 questions
1
vote
2 answers

Can't get current user location using MapKit via Objective-C

I'm setting region coordinates here: // Center Map Here on initial load #define CENTER_LATITUDE 22.11111 #fake for example #define CENTER_LONGITUDE -23.99292 #fake for example I'm setting the region zoom here: MKCoordinateRegion…
Michael Sebastian
  • 785
  • 3
  • 15
  • 33
1
vote
1 answer

Display current location without using CLLocationManager

I am new to iOS and I have a question about finding the current user location. I am reading in Apple documentation: Displaying the User’s Current Location on the Map Map Kit includes built-in support for displaying the user’s current location on…
Neli Chakarova
  • 660
  • 1
  • 5
  • 18
1
vote
1 answer

Exclude userLocation in MapKit search

I am using MapKit with Xcode 6, and everything I have coded up to this point has worked fine. I have a text field that allows users to input any string to search Apple's map. However, one of the issues I am having is that when the search results…
Will Von Ullrich
  • 2,129
  • 2
  • 15
  • 42
1
vote
6 answers

Swift + didUpdateUserLocation not getting called

I am not able to call MKMapView delegate method didUpdateUserLocation. What I did so far: Add framework MapKit.framwork in project Import framework in view controller by import MapKit line Add key in plist file…
Kampai
  • 22,848
  • 21
  • 95
  • 95
1
vote
1 answer

Fitting annotations on a MKMapView while keeping user position centered

I'm trying to fit all annotations on my MKMapView while keeping the current user position in center of map. There are already many references[1][2] on how to zoom out a region to fit annotations on the map but they will adjust the current center…
Peter Theill
  • 3,117
  • 2
  • 27
  • 29
1
vote
1 answer

User Location Mapkit ViewDidLoad

So from the multiple answers I see on here this is how to center and zoom on user location when the app loads and it works great. -(void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation{ NSLog(@"Did update user…
user2014710
0
votes
1 answer

Wrong initial user location in MapView gps

I want to get the user location, that's what I did: I set locationManager in my ViewController: var locationManager = CLLocationManager() func setUpLocationManager() { locationManager.delegate = self locationManager.distanceFilter = 5 …
Edoardo
  • 657
  • 7
  • 24
0
votes
2 answers

In iOS, using Swift, I want to show the user's location, but the blue dot does not appear on the MapView

The blue dot does not appear on the map. It appears there is some disconnect between the CLLocation manager and the self.mapView.userLocation.coordinate value. The CLLocation manager correctly returns the Apple Campus coordinates, but the…
RedEye
  • 845
  • 1
  • 9
  • 22
0
votes
1 answer

Location Marker Not Displaying Swift 4

I am trying to display the current location of the user and have the region set to their current location. Here is my code. @IBOutlet weak var mapView: MKMapView! var locationManager = CLLocationManager() override func viewDidLoad() { …
Cal
  • 422
  • 6
  • 20
0
votes
1 answer

In iOS UI Testing, how do I identify the MKUserLocation annotation?

I'm struggling to identify how I can tell that the MKMapView is showing the current user location pin in a UI Test. This is a MKUserLocation annotation (and I've created an MKAnnotationView to use an image for the pin instead of the blue spot.)…
0
votes
1 answer

viewForAnnotation didn't moves the userLocation

I've implemented - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id)annotation { method to change the default location of userLocation Annotation. Inside this method I've used: if…
Chaudhry Talha
  • 7,231
  • 11
  • 67
  • 116
0
votes
1 answer

Default User Location Annotation with Heading

I know. I found this question as well: Turning user location annotation with heading Sadly, what I'm trying to do here is much simpler (or so I thought) and that one is bit too complicated for me. I would like to show the default blue dot with the…
0
votes
0 answers

CLLocationManagerDelegate Method Not Being Called

I am coding in Swift and I want to use the user's location in my app. I have already added NSLocationWhenInUseUsageDescription and NSLocationAlwaysUsageDescription to Info.plist and have properly configured them. I have also added…
0
votes
1 answer

Creating annotations in MKMapView with an altitude component

This seems to be possible because the MKUserLocation annotation is placed at the user's current altitude. However, the protocol for MKAnnotation only includes a coordinate. Is there a way to adjust its altitude as well? Thanks!
noizybrain
  • 155
  • 1
  • 15
0
votes
1 answer

ios zooming in on users location

Hi I have set my MapKit up to show users location, but it is loading with a view much too zoomed out, so I am trying to zoom it in to e.g. an area of 20 miles. I tried to do this using code from some other questions but none of them seem to make any…
Kitcc
  • 2,138
  • 4
  • 24
  • 42