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 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 Maps SDK for iOS screenshots

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. 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 4.0.0

The 4.0.x series of releases will be the last to support iOS 8. The minimum iOS deployment version will increase to iOS 9.0 in a future release.

Packaging

  • Removed support for 32-bit simulators. (#10962)
  • Added Danish, Hebrew, and European Portuguese localizations. (#10967, #11136, #11695)
  • Removed methods, properties, and constants that had been deprecated as of v3.7.6. (#11205, #11681)
  • Refined certain Swift interfaces by converting them from class methods to class properties. (#11674)
  • Revamped the “Adding Points to a Map” guide. (#11496)

Style layers

Content sources

Map rendering

  • Improved the reliability of collision detection between symbols near the edges of tiles, as well as between symbols when the map is tilted. It is no longer necessary to enable MGLSymbolStyleLayer.symbolAvoidsEdges to prevent symbols in adjacent tiles from overlapping with each other. (#10436)
  • Symbols can fade in and out as the map pans, rotates, or tilts. (#10436)
  • Fixed an issue preventing a dynamically-added MGLRasterStyleLayer from drawing until the map pans. (#10270)
  • Fixed an issue preventing MGLImageSources from drawing on the map when the map is zoomed in and tilted. (#10677)
  • Improved the sharpness of raster tiles on Retina displays. (#10984)
  • Fixed a crash parsing a malformed style. (#11001)
  • Reduced memory usage by clearing in-memory tile cache before entering background. (#11197)
  • Fixed an issue where symbols with empty labels would always be hidden. (#11206)
  • Fixed an issue where a tilted map could flicker while displaying rotating symbols. (#11488)
  • Increased the maximum width of labels by a factor of two. (#11508)

Annotations

Map snapshots

  • Fixed a memory leak that occurred when creating a map snapshot. (#10585)

Other changes

  • The -[MGLMapView convertRect:toCoordinateBoundsFromView:] method and the MGLMapView.visibleCoordinateBounds property’s getter now indicate that the coordinate bounds straddles the antimeridian by extending one side beyond ±180 degrees longitude. (#11265)
  • Feature querying results now account for the MGLSymbolStyleLayer.circleStrokeWidth property. (#10897)
  • Fixed an issue preventing labels from being transliterated when VoiceOver was enabled on iOS 10.x and below. (#10881)
  • Labels are now transliterated from more languages when VoiceOver is enabled. (#10881)
  • Long-pressing the attribution button causes the SDK’s version number to be displayed in the action sheet that appears. (#10650)
  • Reduced offline download sizes for styles with symbol layers that render only icons, and no text. (#11055)
  • Added haptic feedback that occurs when the user rotates the map to due north, configurable via MGLMapView.hapticFeedbackEnabled. (#10847)
  • Added MGLMapView.showsScale as the recommended way to show the scale bar. This property can be set directly in Interface Builder. (#11335)
  • Fixed an issue where the scale bar would not appear until the map had moved. (#11335)