Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Add method to set user tracking mode with completion handler #5840

Closed
1ec5 opened this issue Aug 1, 2016 · 8 comments · Fixed by #14381
Closed

Add method to set user tracking mode with completion handler #5840

1ec5 opened this issue Aug 1, 2016 · 8 comments · Fixed by #14381
Assignees
Labels
feature iOS Mapbox Maps SDK for iOS medium priority navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general

Comments

@1ec5
Copy link
Contributor

1ec5 commented Aug 1, 2016

-[MGLMapView setUserTrackingMode:animated:] kicks off an animation of undetermined length when animated is YES. The application may need to update its state at the very end of this animation. While it’s possible for the delegate to respond to -mapView:regionDidChangeAnimated:, there are many reasons the region might change, and it can often be difficult to distinguish among different animations. There should be a -[MGLMapView setUserTrackingMode:animated:completionHandler:] method that takes a completion block.
#5839 is a request for a similar completion handler for -showAnnotations:animated:.

/cc @bsudekum

@zugaldia
Copy link
Member

@LukasPaczos I know that you're looking at ways to improve the Location Layer Plugin, this would be a good thing to add too.

/cc: @lilykaiser @chloekraw

@lilykaiser
Copy link

Marking as "medium priority" after discussion with internal consumers of the SDK

@1ec5 1ec5 added the navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general label Aug 22, 2018
@LukasPaczos
Copy link
Member

Ticket tracking the request for Android: #13243.

@jmkiley jmkiley self-assigned this Jan 23, 2019
@ReSpawN
Copy link

ReSpawN commented Feb 7, 2019

I'd really like this too. Or perhaps a timing function to determine a DispatchQueue's length for waiting until the next animation or logical progression. Currently you cannot fly the camera to a location and setting camera pitch.

@julianrex
Copy link
Contributor

/cc @zugaldia for follow up

@1ec5 1ec5 added MapKit parity For feature parity with MapKit on iOS or macOS and removed MapKit parity For feature parity with MapKit on iOS or macOS labels Apr 9, 2019
@1ec5 1ec5 self-assigned this Apr 9, 2019
@rupendrag-ios
Copy link

Hello Team,
My application get crash when i am using SetuserTrackingmode Follow and FollowWithHeading
Screen Shot 2020-01-23 at 2 56 54 PM
Crashed: com.apple.main-thread
0 libsystem_malloc.dylib 0x199060b18 nanov2_allocate_from_block$VARIANT$mp + 4
1 libsystem_malloc.dylib 0x19905fecc nanov2_malloc$VARIANT$mp + 60
2 libsystem_malloc.dylib 0x19906e750 malloc_zone_malloc + 156
3 CoreFoundation 0x19932ddd4 __CFStrAllocateMutableContents + 96
4 CoreFoundation 0x19932d624 __CFStringChangeSizeMultiple + 608
5 CoreFoundation 0x199328218 __CFStringAppendBytes + 612
6 CoreFoundation 0x19931a2e4 __CFStringAppendFormatCore + 12820
7 CoreFoundation 0x19931a65c _CFStringCreateWithFormatAndArgumentsAux2 + 152
8 CoreFoundation 0x19931a730 CFStringCreateWithFormat + 60
9 CoreFoundation 0x199277e8c -[_CFXPreferences(PlistSourceAdditions) withManagedSourceForIdentifier:user:perform:] + 104
10 CoreFoundation 0x19927d84c -[_CFXPreferences appValueIsForcedForKey:appIdentifier:] + 160
11 CoreFoundation 0x1993b0e08 CFPreferencesAppValueIsForced + 104
12 GeoServices 0x19edc86e4 ___getValue_block_invoke.llvm.7478192230168857876 + 180
13 MapKit 0x1a6b28834 MapKitConfig_GetPropertiesForKey + 2912
14 GeoServices 0x19edc6e54 GEOConfigGetPropertiesForKey + 84
15 GeoServices 0x19edc85bc _getValue.llvm.7478192230168857876 + 180
16 GeoServices 0x19edc65f0 GEOConfigGetInteger + 28
17 MapKit 0x1a69a7cac -[MKMapView _canShowControls] + 92
18 MapKit 0x1a6986704 -[MKMapView _showOrHideScaleIfNecessary:] + 48
19 MapKit 0x1a697d1a8 -[MKMapView _didChangeRegionMidstream:] + 256
20 MapKit 0x1a69aa420 -[MKMapView mapLayerDidChangeVisibleRegion] + 56
21 VectorKit 0x1a76cd9d4 __77-[VKMapAnnotationTrackingCameraController _rotateToHeadingAnimated:duration:]_block_invoke + 948
22 VectorKit 0x1a76cd5c8 -[VKMapAnnotationTrackingCameraController rotateToHeadingAnimated:duration:] + 664
23 VectorKit 0x1a733cbac -[VKAnnotationTrackingCameraController startTrackingAnnotation:trackHeading:animated:] + 572
24 MapKit 0x1a69a5464 -[MKMapView setUserTrackingMode:animated:fromTrackingButton:] + 836
25 lineinspectionSTG 0x1004f27dc specialized BeginInspectionVC.mapView(
:regionDidChangeAnimated:) + 4306380764 (:4306380764)
26 lineinspectionSTG 0x1004ed704 @objc BeginInspectionVC.mapView(
:regionDidChangeAnimated:) + 4306360068 (:4306360068)
27 MapKit 0x1a697d4c0 -[MKMapView _didChangeRegionMidstream:] + 1048
28 MapKit 0x1a69aa5a4 -[MKMapView mapLayerDidChangeRegionAnimated:] + 64
29 VectorKit 0x1a76cd5f4 -[VKMapAnnotationTrackingCameraController rotateToHeadingAnimated:duration:] + 708
30 VectorKit 0x1a733cbac -[VKAnnotationTrackingCameraController startTrackingAnnotation:trackHeading:animated:] + 572
31 MapKit 0x1a69a5464 -[MKMapView setUserTrackingMode:animated:fromTrackingButton:] + 836
32 lineinspectionSTG 0x1004f27dc specialized BeginInspectionVC.mapView(
:regionDidChangeAnimated:) + 4306380764 (:4306380764)
33 lineinspectionSTG 0x1004ed704 @objc BeginInspectionVC.mapView(
:regionDidChangeAnimated:) + 4306360068 (:4306360068)
34 MapKit 0x1a697d4c0 -[MKMapView _didChangeRegionMidstream:] + 1048
35 MapKit 0x1a69aa5a4 -[MKMapView mapLayerDidChangeRegionAnimated:] + 64
36 VectorKit 0x1a76cdaa4 __77-[VKMapAnnotationTrackingCameraController _rotateToHeadingAnimated:duration:]_block_invoke.102 + 708
37 VectorKit 0x1a722d780 -[VKAnimation stopAnimation:] + 572
38 VectorKit 0x1a722db48 -[VKTimedAnimation stopAnimation:] + 836
39 VectorKit 0x1a722dc44 -[VKTimedAnimation onTimerFired:] + 4306380764
40 VectorKit 0x1a71a1ef8 md::AnimationManager::onTimerFired(double) + 4306360068
41 VectorKit 0x1a71a2b5c md::InteractiveAnimationManager::onTimerFired(double) + 1048
42 VectorKit 0x1a74a4ef8 md::MapEngine::layoutScene(double, bool) + 64
43 VectorKit 0x1a74a0938 -[_MapEngineRenderQueueSource renderQueueForTimestamp:] + 708
44 VectorKit 0x1a75b1470 -[MDDisplayLayer _renderQueueForTimestamp:prepareHandler:] + 572
45 VectorKit 0x1a75b1440 -[MDDisplayLayer renderQueueForTimestamp:] + 836
46 VectorKit 0x1a771c8f8 -[MetalLayer _onTimerFired:withPresent:] + 4306380764
47 VectorKit 0x1a74a5938 md::MapEngine::renderScene(double, std::__1::function<void ()>) + 4306360068
48 VectorKit 0x1a74a365c md::MapEngine::onRenderTimerFired(double) + 1048
49 VectorKit 0x1a7716580 ggl::DisplayLink::onTimerFired(double) + 64
50 VectorKit 0x1a77160e0 -[_GGLDisplayLinkTarget displayLinkFired:] + 708
51 QuartzCore 0x19fbbe514 CA::Display::DisplayLink::dispatch_items(unsigned long long, unsigned long long, unsigned long long) + 572
52 IOKit 0x19a2b1eb0 IODispatchCalloutFromCFMessage + 836
53 CoreFoundation 0x1992cd6d4 __CFMachPortPerform + 4306380764
54 CoreFoundation 0x1992f6e5c CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION + 4306360068
55 CoreFoundation 0x1992f6588 __CFRunLoopDoSource1 + 1048
56 CoreFoundation 0x1992f145c __CFRunLoopRun + 64
57 CoreFoundation 0x1992f08bc CFRunLoopRunSpecific + 708
58 GraphicsServices 0x1a315c328 GSEventRunModal + 572
59 UIKitCore 0x19d3866d4 UIApplicationMain + 836
60 lineinspectionSTG 0x100349724 main + 21 (AppDelegate.swift:21)
61 libdyld.dylib 0x19917b460 start + 4306360068

@zugaldia
Copy link
Member

@rupendrag-ios considering that this ticket was closed a while ago, would you mind opening a new ticket with the issue that you're seeing? Since #15971, the right repo for such a ticket would be https://github.com/mapbox/mapbox-gl-native-ios. Thanks!

@julianrex
Copy link
Contributor

@rupendrag-ios Also, this appears to be a MapKit issue rather than a Mapbox issue; before creating a new issue, please ensure this bug is Mapbox related.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature iOS Mapbox Maps SDK for iOS medium priority navigation For the Mapbox Navigation SDK for Android or iOS or navigation use cases in general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants