Upgraded MGLMapSnapshotter to be compatible with the latest mbgl.
Converted as many of MGLMapSnapshotter’s instance variables and properties as possible into local variables close to the point of use. The completion handler of -startWithCompletionHandler: and its variants is no longer called as part of -cancel, when the snapshotter is deallocated, or when the application is terminating. -loading once again works and is used to avoid concurrent requests, now that the completion handler is no longer memoized. Snapshotter options are copied and converted into a snapshotter on demand as late as possible.
Made the decoration step synchronous while continuing to perform it on a worker thread. Only access self on user-facing queues. Ensure MGLMapSnapshotter.loading is reset after snapshotting.
Pushed some drawing and completion code up from inner completion blocks to outer completion blocks to avoid excessively passing state around. Converted a few class methods into standalone C functions to emphasize the avoidance of captured state.
If the view is not tilted, we want the new symbols to show up faster, so we squeeze the placement period.
On contrary, with the tilted view it's more important to make placement rarely for performance reasons and as the new symbols are normally "far away" and the user is not that interested to see them ASAP.
The MGLSymbolStyleLayer.iconTextFit property now respects the cap insets of any nine-part stretchable image passed into the -[MGLStyle setImage:forName:] method.
The “Manipulate Style” command in macosapp demonstrates the stretchable image feature by adding a single Ohio state route shield image, which has cap insets defined in the asset catalog, and labeling each Ohio state route with that image, stretched to fit the route number without widening the icon’s stroke.
Platform integration callback for platforms that do not have full
run loop integration or don't want to block at the Mapbox GL Native
loop. It will be called from any thread and is up to the platform
to, after receiving the callback, call RunLoop::runOnce() from the
same thread as the Map object lives.