Mapbox iOS SDK
The Mapbox iOS SDK is an open-source framework for embedding interactive map views with scalable, customizable vector maps into Cocoa Touch applications on iOS 8.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 iOS SDK homepage. For detailed usage instructions, read “First steps with the Mapbox iOS SDK” and consult the online examples. A full changelog is also available.
If you have any questions, please contact our support team. We welcome your bug reports and feature requests.
Changes in version 3.6.0
Packaging
- Xcode 8.0 or higher is now recommended for using this SDK. (#8775)
- Fixed an issue in the static framework where localizations would never load. (#9074)
- Updated MGLMapView’s logo view to display the new Mapbox logo. (#8771, #8773)
Styles
- Added support for 3D extrusion of buildings and other polygonal features via the
MGLFillExtrusionStyleLayer
class and thefill-extrusion
layer type in style JSON. (#8431) - MGLMapView and MGLTilePyramidOfflineRegion now default to version 10 of the Mapbox Streets style. Similarly, several style URL class methods of MGLStyle return URLs to version 10 styles. Unversioned variations of these methods are no longer deprecated.
MGLStyleDefaultVersion
should no longer be used with any style other than Streets. (#6301) - Added class methods to MGLStyle that correspond to the new Traffic Day and Traffic Night styles. (#6301)
- MGLSymbolStyleLayer’s
iconImageName
,iconScale
,textFontSize
,textOffset
, andtextRotation
properties can now be set to a source or composite function. (#8544, #8590, #8592, #8593) - Fixed an issue where setting the
MGLVectorStyleLayer.predicate
property failed to take effect if the relevant source was not in use by a visible layer at the time. (#8653) - Fixed an issue preventing programmatically added style layers from appearing in already cached tiles. (#8954)
- Fixed an issue causing a composite function’s highest zoom level stop to be misinterpreted. (#8613, #8790)
- Fixed an issue where re-adding a layer that had been previously removed from a style would reset its paint properties. Moved initializers for
MGLTileSource
,MGLStyleLayer
, andMGLForegroundStyleLayer
to their concrete subclasses; because these classes were already intended for initialization only via concrete subclasses, this should have no developer impact. (#8626) - Feature querying results now account for any changes to a feature’s size caused by a source or composite style function. (#8665)
- Letter spacing is now disabled in Arabic text so that ligatures are drawn correctly. (#9062)
Annotations
- Added a new initializer to
MGLAnnotationView
so that it is possible to create a new instance with an associated annotation object. (#9029) - Fixed an issue causing a view-backed annotation to disappear immediately instead of animating when the annotation’s
coordinate
property is set to a value outside the current viewport. (#8565) - Fixed an issue in which
MGLMapView
overrode the tint colors of its annotation views. (#8789) - Fixed an issue causing annotation views to persist in the map’s annotation container view even after their associated annotations were removed. (#9025)
- The
MGLPolyline.coordinate
andMGLPolygon.coordinate
properties now return the midpoint and centroid, respectively, instead of the first coordinate. (#8713)
User interaction
- Added a scale bar to
MGLMapView
that indicates the scale of the map. (#7631) - Fixed an issue where gesture recognizers associated with map view interactivity were not disabled when their related interactions were disabled. (#8304)
- Fixed an issue preventing the Mapbox Telemetry confirmation dialog from appearing when opened from within a map view in a modal view controller. (#9027)
- Corrected the size of MGLMapView’s compass. (#9060)
- The Improve This Map button in the attribution action sheet now leads to a feedback tool that matches MGLMapView’s rotation and pitch.
-[MGLAttributionInfo feedbackURLAtCenterCoordinate:zoomLevel:]
no longer respects the feedback URL specified in TileJSON. (#9078)
Other changes
- Fixed a crash that occurred when accessing the
MGLMultiPolygon.coordinate
property. (#8713) - Fixed a crash or console spew when MGLMapView is initialized with a frame smaller than 64 points wide by 64 points tall. (#8562)
- Fixed an issue that caused the compass and scale bar to underlap navigation and tab bars. (#7716)
- The error passed into
-[MGLMapViewDelegate mapViewDidFailLoadingMap:withError:]
now includes a more specific description and failure reason. (#8418) - Improved CPU and battery performance while animating a tilted map’s camera in an area with many labels. (#9031)
- Fixed an issue rendering polylines that contain duplicate vertices. (#8808)