Questions tagged [mkusertrackingmode]

19 questions
5
votes
1 answer

MKMapView userTrackingMode reset in SwiftUI

I’m having troubles showing a MKMapView in SwiftUI with userTrackingMode set to .follow. I’m showing a map with: struct ContentView: View { var body: some View { MapView() } } And in this MapView I’m (a) setting userTrackingMode and…
Rob
  • 415,655
  • 72
  • 787
  • 1,044
4
votes
0 answers

iOS MKMapView setting user location to .followWithHeading fails to zoom in on user location

I am creating a map based application which, as many do, incorporates a button which will in theory re-center the map on the user's location and zoom in on the user (if the zoom level has changed). Currently, in viewDidLoad() I have the line: …
KaplanAlex
  • 85
  • 1
  • 6
4
votes
1 answer

Retain map zoom level while tracking user location

I'm having a problem where the map is automatically zoomed out when the user tap on the button that will start tracking the user's location change like what the Apple Map app does when you tap on the anchor button once. I tried to set the region…
Spartan0x75
  • 91
  • 1
  • 4
3
votes
1 answer

User Tracking Mode Missing Animation, Swift

I have This code here including userTrackingMode = .follow and it works great but it just pops onto Userlocation instead of animating the map to go to the user location ...which is what i want . Anyone can tell me hot to add that animation making…
adirbuilder
  • 101
  • 1
  • 12
3
votes
0 answers

Set the zoom for MKMapCamera and MKUserTrackingMode to be equal in a view controller

I'm using both MKUserTrackingMode and MKMapCamera in the same ViewController to be able to track the user when they're navigating and to rotate the camera accordingly as the user travels along their route. MKUserTrackingMode zooms into a certain…
Pablo Picasso
  • 133
  • 2
  • 12
3
votes
3 answers

MKUserTrackingBarButtonItem tint colour IOS7 does not work but does on IOS 6

Using XCode 5 targeting minimum OS of IOS6 I create the bar button item like this self.navigationItem.rightBarButtonItem = [[MKUserTrackingBarButtonItem alloc] initWithMapView:self.mapView]; And then set its tint like…
2
votes
0 answers

How to prevent auto-zooming with IOS MapKit when using userTrackingMode = .followWithHeading? (using SwiftUI)

How can one prevent auto-zooming with IOS MapKit when using userTrackingMode = .followWithHeading? That is I am setting the current user location to the centre of the screen, and have "view.userTrackingMode = .followWithHeading" so that the map…
Greg
  • 34,042
  • 79
  • 253
  • 454
1
vote
1 answer

Required steps to show User Location in MapKit

I have a mapView embedded in a View Controller that I would like to show the user's location. While the following compiles, the map after loading does nothing and does not show the user's location. I tried the code first in viewDidLoad and then in…
user1904273
  • 4,562
  • 11
  • 45
  • 96
1
vote
0 answers

How can we implement tracking mode on Google Map?

When I try to implement user tracking mode(like ios) on google map, the mode tracks to user we she/he moves along way, I could not find any documentation on its official side.Which method provides like picture2? My map's settings as below code…
1
vote
0 answers

MKMap is not zooming when Map is in MKUserTrackingModeFollowWithHeading Mode

I am facing a problem related to MKMapView.I set zoom level 17 on viewdidload but when in MKMap MKUserTrackingModeFollowWithHeading called then it reset zoom level 14.I am unable to track where problem occurs.
1
vote
2 answers

Any Workaround to MKUserTrackingModeFollowWithHeading Bug in iOS6?

I'm desperately looking for a workaround to the well documented bug in MapKit in iOS6 that makes MKUserTrackingModeFollowWithHeading effectively unusable at higher magnifications: There is a very simple example project…
Undistraction
  • 42,754
  • 56
  • 195
  • 331
0
votes
0 answers

How can I disable auto-zooming when using userTrackingMode?

I am trying to zoom out of a map but it keeps zooming back in because of the .userTrackingMode that is set to .follow. Is there a way to prevent or to write your own tracking mode method? I tried to disable the tracking for 20seconds or so, but I…
C Fuchs
  • 1
  • 1
0
votes
1 answer

Solved Create custom Apple Maps user location button

I was working on this I didn't find any documentation and so I thought I would create some. After I solved it I was like oh that was easier than I thought. Anyway, I wanted to create the 3 button states I saw on apple maps. I tried a few setRegion…
jeremy wilson
  • 136
  • 1
  • 5
0
votes
1 answer

GMSMapView tracking mode heading

In my app, I am using GMSMapView, and I would like to change tracking mode. In iOS MapKit, I can change the tracking mode to MKUserTrackingModeFollowWithHeading, but don't know how to change it in GMSMapView. In the app Google Maps, it is working…
0
votes
1 answer

IOS7 - Mapkit and heading

I play around the Mapkit and want to rotate the map follow user's heading. It works with this function: - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation { _mapView.centerCoordinate…
sooon
  • 4,718
  • 8
  • 63
  • 116
1
2