Mapbox Maps SDK for iOS
The Mapbox Maps SDK for iOS is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 9.0 and above using Objective-C, Swift, or Interface Builder. It takes stylesheets that conform to the Mapbox Style Specification, applies them to vector tiles that conform to the Mapbox Vector Tile Specification, and renders them using OpenGL.
For setup information, check out the Mapbox Maps SDK for iOS homepage. For detailed usage instructions, read “First steps with the Mapbox Maps SDK for iOS” and consult the online examples.
If you have any questions, please see our help page. We welcome your bug reports, feature requests, and contributions.
Changes in version 4.5.0
Styles and rendering
- Added support for 120 frames per second on capable devices. (#12979)
- Added an
MGLSymbolStyleLayer.symbolZOrder
property for forcing point features in a symbol layer to be layered in the same order that they are specified in the layer’s associated source. (#12783) - Fixed a crash when a style layer
*-pattern
property evaluates to nil for a particular feature. (#12896) - Fixed an issue with view annotations (including the user location annotation) and the GL map lagging relative to each other. (#12895)
- Fixed an issue where fill and line layers would occasionally flicker on zoom (#12982)
User location
- Added
-[MGLMapViewDelegate mapViewUserLocationAnchorPoint:]
to customize the position of the user location annotation.. (#12907) - Marked
-[MGLMapView setUserLocationVerticalAlignment:]
as deprecated. Use-[MGLMapViewDelegate mapViewUserLocationAnchorPoint:]
instead. (#12907) - Added the
-[MGLMapView updateUserLocationAnnotationView]
and-[MGLMapView updateUserLocationAnnotationView:animated:]
methods to update the position of the user location annotation between location updates. (#12907) - Fixed an issue where the user location annotation was positioned incorrectly when the map view had a left or right content inset. (#12907)
Offline maps
- Added
-[MGLOfflineStorage addContentsOfFile:withCompletionHandler:]
and-[MGLOfflineStorage addContentsOfURL:withCompletionHandler:]
methods to add pregenerated offline packs to offline storage. (#12791) - Fixed an issue where some tiles weren’t rendered correctly when no internet connectivity was available (#12931)
Other changes
- Added
MGLAltitudeForZoomLevel
andMGLZoomLevelForAltitude
to public API for conversion between zoom levels and altitudes. (#12986) - Deprecated the
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromDistance:pitch:heading:]
method in favor of+[MGLMapCamera cameraLookingAtCenterCoordinate:altitude:pitch:heading:]
and+[MGLMapCamera cameraLookingAtCenterCoordinate:acrossDistance:pitch:heading:]
. (#12966) - Fixed an issue where
+[MGLMapCamera cameraLookingAtCenterCoordinate:fromEyeCoordinate:eyeAltitude:]
created a camera looking from the wrong eye coordinate. (#12966) - Added an
MGLMapCamera.viewingDistance
property based on the existingMGLMapCamera.altitude
property. (#12966) - Fixed an issue where
-[MGLMapSnapshotter startWithQueue:completionHandler:]
failed to call its completion handler in some cases. (#12355) - Fixed bugs in coercion expression operators (
to-array
applied to empty arrays,to-color
applied to colors, andto-number
applied to null) #12864 - Added the
MGLCollisionBehaviorPre4_0
Info.plist key for applications that require the collision detection behavior in version v3.7 of the SDK. (#12941) - Fixed an issue where symbols from the events library could be duplicated when the maps SDK was used in conjunction with another Mapbox framework. (#13008)
Recent changes
See the full changelog for previous releases.