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.4.1
- Fixed several crashes related to telemetry collection. (#12825)
- Fixed a crash when the network connection was offline. (#12889)
Recent changes
4.4.0
Styles and rendering
- When a symbol in an
MGLSymbolStyleLayer
has both an icon and text, both are shown or hidden together based on available space. (#12521) - Invalid values of
MGLSymbolStyleLayer.textFontNames
are treated as warnings instead of errors. (#12414) - Added an
MGLLineStyleLayer.lineGradient
property that can be used to define a gradient with which to color a line feature. (#12575) - The
MGLLineStyleLayer.linePattern
,MGLFillStyleLayer.fillPattern
, andMGLFillStyleLayer.fillExtrusionPattern
properties can now be set to expressions that refer to feature attributes. (#12284) - Reduced the amount of memory consumed by font data after changing the style. (#12414)
-[MGLShapeSource initWithIdentifier:shape:options:]
warns about possible attribute loss when passing in anMGLShapeCollection
object. (#12625)- Added an
MGLShapeSourceOptionLineDistanceMetrics
option that enables or disables calculating line distance metrics. (#12604) - Fixed an issue where the
cubic-bezier
curve type formgl_interpolate:withCurveType:parameters:stops:
expressions was misinterpreted for some style layer properties. (#12826) - Fixed an issue that could cause symbols to fade in during pan operations instead of always showing when using
MGLSymbolStyleLayer.iconAllowsOverlap
orMGLSymbolStyleLayer.textAllowsOverlap
properties. (#12698)
Offline maps
- Added the
MGLShapeOfflineRegion
class for creating an offline pack that covers an arbitrary shape. (#11447) - Fixed crashes when offline storage encountered certain SQLite errors. (#12224)
Other changes
- The predefined values of
MGLMapView.decelerationRate
are now typed asMGLMapViewDecelerationRate
s for improved bridging to Swift. (#12584) - Added an
-[MGLMapViewDelegate mapView:shapeAnnotationIsEnabled:]
method to specify whether an annotation is selectable. (#12352) - The
-[MGLMapView visibleFeaturesAtPoint:]
method can now return features near tile boundaries at high zoom levels. (#12570) - Fixed inconsistencies in exception naming. (#12583)
- Fixed an issue where
-[MGLMapView convertCoordinateBounds:toRectToView:]
would return an empty CGRect if the bounds crossed the antimeridian. (#12758)
See the full changelog for previous releases.