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.
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
Packaging
Styles and rendering
- The layout and paint properties on subclasses of
MGLStyleLayer
are now of typeNSExpression
instead ofMGLStyleValue
. A new “Predicates and Expressions” guide provides an overview of the supported operators. (#10726) - Added an
MGLComputedShapeSource
class that allows applications to supply vector data to a style layer on a per-tile basis. (#9983) - A style can now display smooth hillshading and customize its appearance at runtime using the
MGLHillshadeStyleLayer
class. Hillshading is based on a rasterized digital elevation model supplied by theMGLRasterDEMSource
class. (#10642) - The
MGLSymbolStyleLayer.textFontNames
property can now depend on a feature’s attributes. (#10850)
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)
- Properties such as
MGLSymbolStyleLayer.iconAllowsOverlap
andMGLSymbolStyleLayer.iconIgnoresPlacement
now account for symbols in other sources. (#10436) - Fixed an issue preventing a dynamically-added
MGLRasterStyleLayer
from drawing until the map pans. (#10270) - Fixed an issue preventing
MGLImageSource
s 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)
Annotations
- Fixed an issue preventing
MGLAnnotationImage.image
from being updated. (#10372) - Improved performance of
MGLAnnotationView
-backed annotations that havescalesWithViewingDistance
enabled. (#10951)
Map snapshots
- Fixed a memory leak that occurred when creating a map snapshot. (#10585)
- Fixed an issue that caused
MGLMapSnapshotter.pointForCoordinate
to return an incorrect value. (#11035)
Other changes
- 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)