[iOS] Add turnstile events for Snapshotter#13476
Conversation
| _latLngForFn = std::move(latLngForFn); | ||
| _scale = scale; | ||
| _image = image; | ||
| [MGLMapboxEvents pushTurnstileEvent]; |
There was a problem hiding this comment.
I think this should be in -startWithQueue:completionHandler: - an MGLMapSnapshotter may be allocated and not used, or used multiple times.
Perhaps sending the turnstile event somewhere around
mapbox-gl-native/platform/darwin/src/MGLMapSnapshotter.mm
Lines 201 to 210 in 53351c2
would make sense?
There was a problem hiding this comment.
@julianrex I think the behavior should consist with MGLMapview did.
mapbox-gl-native/platform/ios/src/MGLMapView.mm
Lines 629 to 632 in 8bc362e
The turnstile events send in the initializer of mapview.
There was a problem hiding this comment.
@julianrex @tobrun What's your opinion? Can I merge this PR?
julianrex
left a comment
There was a problem hiding this comment.
We can go ahead and merge this for consistency (with the existing landed Android PR) - though I'd like to fully understand why it shouldn't be in the start... method.
Is there a ticket tracking this question? We should get to a resolution. /cc @lloydsheng @julianrex |
Snapshotter (i.e. https://www.mapbox.com/android-docs/maps/overview/snapshotter) is part of the Maps SDK and should be sending turnstile events before usage on both iOS and Android (Snapshotter requests need the same access token we use for regular tile requests).
We should add turnstile events for Snapshotter.