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.

Mapbox iOS SDK screenshots

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 see our help page. We welcome your bug reports, feature requests, and contributions.

Changes in version 3.7.0

Networking and storage

  • Added a new MGLMapSnapshotter class for capturing rendered map images from an MGLMapView’s camera. (#9891)
  • Reduced the time it takes to create new MGLMapView instances in some cases. (#9864)
  • Added support for forced cache revalidation that will eliminate flickering that was sometimes visible for certain types of tiles (e.g., traffic tiles). (#9670, #9103)
  • Improved the performance of the SDK when parsing vector tile data used to render the map. (#9312)

Styles

  • Added a new type of source, represented by the MGLImageSource class at runtime, that displays a georeferenced image. (#9110)
  • Setting a style using MGLMapView‘s styleURL property now smoothly transitions from the previous style to the new style and maintains equivalent layers and sources along with their identifiers. (#9256)
  • Added MGLCircleStyleLayer.circlePitchAlignment and MGLSymbolStyleLayer.iconPitchAlignment properties to control whether circles and symbols lie flat against a tilted map. (#9426, #9479)
  • Added an MGLSymbolStyleLayer.iconAnchor property to control where an icon is anchored. (#9849)
  • The maximumTextWidth and textLetterSpacing properties of MGLSymbolStyleLayer are now compatible with MGLSourceStyleFunctions and MGLCompositeStyleFunctions, allowing data-driven styling of these properties. (#9870)
  • Improved the legibility of labels that follow lines when the map is tilted. (#9009)
  • Fixed an issue that could cause flickering when a translucent raster style layer was present. (#9468)
  • Fixed an issue that could cause antialiasing between polygons on the same layer to fail if the fill layers used data-driven styling for the fill color. (#9699)
  • The previously deprecated support for style classes has been removed. For interface compatibility, the API methods remain, but they are now non-functional.

Annotations and user interaction

  • Fixed several bugs and performance issues related to the use of annotations backed by MGLAnnotationImage. The limits on the number and size of images and glyphs has been effectively eliminated and should now depend on hardware constraints. These fixes also apply to images used to represent icons in MGLSymbolStyleLayer. (#9213)
  • Increased the default maximum zoom level from 20 to 22. (#9835)
  • Added an overlays property to MGLMapView. (#8617)

Other changes

  • Fixed an issue that could cause line label rendering glitches when the line geometry is projected to a point behind the plane of the camera. (#9865)
  • Fixed an issue that could cause a crash when using -[MGLMapView flyToCamera:completionHandler:] and related methods with zoom levels at or near the maximum value. (#9381)