mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

Add method to set user tracking mode with completion handler

Open 1ec5 opened this issue 10 years ago • 8 comments

-[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

1ec5 avatar Aug 01 '16 22:08 1ec5

@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

zugaldia avatar Aug 22 '18 19:08 zugaldia

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

lilykaiser avatar Aug 22 '18 20:08 lilykaiser

Ticket tracking the request for Android: https://github.com/mapbox/mapbox-gl-native/issues/13243.

LukasPaczos avatar Oct 31 '18 13:10 LukasPaczos

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.

CyntaxDotDev avatar Feb 07 '19 16:02 CyntaxDotDev

/cc @zugaldia for follow up

julianrex avatar Apr 08 '19 20:04 julianrex

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

rupendrag-ios avatar Jan 23 '20 09:01 rupendrag-ios

@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 https://github.com/mapbox/mapbox-gl-native/issues/15971, the right repo for such a ticket would be https://github.com/mapbox/mapbox-gl-native-ios. Thanks!

zugaldia avatar Jan 23 '20 21:01 zugaldia

@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.

julianrex avatar Jan 23 '20 21:01 julianrex