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
22
votes
4 answers

iOS 10 heading arrow for MKUserLocation dot

The Maps app in iOS 10 now includes a heading direction arrow on top of the MKUserLocation MKAnnotationView. Is there some way I can add this to MKMapView in my own apps? Edit: I'd be happy to do this manually, but I'm not sure if it's possible?…
Ben Williams
  • 4,695
  • 9
  • 47
  • 72
7
votes
2 answers

MKUserLocation is selectable, falsely intercepting touches from custom MKAnnotationViews

I have a normal map in my iOS app where "Shows Users Location" is enabled - meaning I have my normal blue dot on the map, showing my position and accuracy info. The callout is disabled in code. But I also have custom MKAnnotationViews that are…
kbjeppesen
  • 335
  • 1
  • 3
  • 9
6
votes
0 answers

MKUserTrackingButton turns into a spinner when no permission is given for locations services

I have added Apple's new MKUserTrackingButton to my app on a map view. It works fine when the user has previously given permission to use location services (e.g. CLAuthorizationStatus.authorizedWhenInUse). However, when the user has denied…
Mischa
  • 15,816
  • 8
  • 59
  • 117
3
votes
2 answers

How to get rid of the MKBalloonCalloutView in iOS 14

I have the following code which works for iOS 13 and lower. func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { mapView.userLocation.title = "You are here" mapView.userLocation.subtitle = // user's location } func…
Lance Samaria
  • 17,576
  • 18
  • 108
  • 256
3
votes
1 answer

How to set Mapkit user tracking button state

I've created a map with a user tracking button on the top right corner. I was wondering how I would be able to set the state to "followWithHeadlights" by default on load so that it follows the users current position just like you would have on…
3
votes
0 answers

Transform Annotationview based on user location heading direction

I am trying to transform annotationview based on user location heading direction.Annotation view not changing properly. LocationMapView.userTrackingMode=YES; locationManager.headingFilter =5; [locationManager…
2
votes
0 answers

Get the MKAnnotationView of user location

I'm trying to get the MKAnnotationView that displays the user location (blue dot) in MapKit to add a custom gesture recognizer. Is this possible? I've tried via the delegate method but I don't know how to dequeue the view when I don't have the…
gugge
  • 918
  • 1
  • 11
  • 17
2
votes
1 answer

Adding accessory button on user location callout

I'm making a clickable placemark. I set the title of the placemark. Title is adress. I want If you click on that adress It will push to another View to Show Adress Number,City,Country etc. I Tried this code. But It haven't UIButton in application in…
dafinoo
  • 61
  • 9
2
votes
2 answers

Is possible customize MKUserTrackingBarButtonItem?

I'm using MKUserTrackingBarButtonItem to locate on MKMapView. I've added it on navigation controller as navigationItem programmatically. My questions are: Could I customize MKUserTrackingBarButtonItem? Example: my navigation controller has a blue…
2
votes
3 answers

How to convert MKUserLocation to CLLocation? - swift

I need a way to convert MKUserLocation to CLLocation so that I can find the distance between the user location and another predefined CLLocation using the distanceFromLocation method in swift.
dhruvm
  • 2,672
  • 2
  • 19
  • 24
2
votes
3 answers

Remove user location annotation from mapView

I have to remove all the annotations added to my MKMapView but when I execute : NSMutableArray *annotationsToRemove = [[NSMutableArray alloc] initWithArray: mapView.annotations]; [mapView removeAnnotations: annotationsToRemove]; The array…
swifferina
  • 293
  • 4
  • 16
2
votes
1 answer

Why is MKUserLocation in my annotations?

I want to calculate distance between user and all annotations. My annotations come from a csv file which is parsed. My annotations are in a Location class. Everything works fine except the distance calculation. To calculate the distance, I found…
mexson
  • 23
  • 4
2
votes
2 answers

Removing selection image on user location annotation

I have the following code: - (void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)annotation{ annotation.image = [UIImage imageNamed:@"pinIconOn.png"]; } - (void)mapView:(MKMapView *)mapView…
1
vote
1 answer

How to disable click on MKUserLocation?

I am using MKMapView in my Xamarin.IOS project. I have some customs annotation around userLocation. Once those annotations placed they can't be easily clicked because of userLocation bluedot. I need userLocation as well what I want is just disable…
1
vote
1 answer

Stop centralizing the user location when zoom out/in or move to other location in ios

Trying to track user location using MKMapView. Using below code -(void)viewDidLoad{ myMapView.delegate = self; self.locationManager = [[CLLocationManager alloc] init]; self.locationManager.delegate = self; arrDate = [[NSMutableArray…
Chandan Reddy
  • 221
  • 1
  • 5
  • 19
1
2 3