This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
ios-v4.0.0-beta.3
Pre-release
Pre-release
·
3655 commits
to master
since this release
Changes since Mapbox iOS SDK v4.0.0-beta.2:
Map content sources
- Renamed
MGLRasterSource
toMGLRasterTileSource
andMGLVectorSource
toMGLVectorTileSource
. (#11568) - Added an
MGLTileSourceOptionDEMEncoding
option for specifying the DEM encoding format used by anMGLRasterDEMSource
object. The Mapzen Terrarium encoding is now supported in addition to the Mapbox format. (#11274)
Style layer properties
- Any expression in style JSON can now be represented in an NSExpression, whether natively or through a general-purpose
MGL_FUNCTION()
syntax. (#11389, #11472) - Simplified the syntax for various expression functions. An expression format such as
FUNCTION('Old', 'stringByAppendingString:', ' ', 'MacDonald')
becomesmgl_join({'Old', ' ', 'MacDonald'})
. (#11472) {Curly braces}
inside a non–constant value expression are now interpreted as literal curly braces instead of a token. To set theMGLSymbolStyleLayer.text
orMGLSymbolStyleLayer.iconImageName
property to the result of concatenating multiple feature attributes, use themgl_join:
expression function. (#11509, #11472)- Added an
MGL_IF()
expression function that, unlike a conditional expression, can take any number of cases. It is no longer necessary to deeply nest conditional expressions for “else if” logic. This function corresponds to thecase
expression operator in style JSON. (#11450, #11472) - Added an
MGL_MATCH()
expression function corresponding to thecase
expression operator in JSON. This function is akin to a “switch…case” statement in Objective-C or Swift. (#11464, #11472) - Added an
mgl_coalesce:
expression function that behaves like the?:
operator in Objective-C or the??
operator in Swift. (#11464) - Added support for array subscripting inside expression formats, as well as
$mgl_geometryType
,$mgl_featureIdentifier
, and$mgl_featureProperties
variables for introspecting the feature being evaluated. (#11528) - Added support for the
CAST()
syntax in expression formats. (#11472) - Layer property getters now represent linear interpolation with a curve type of
linear
instead ofexponential
. (#11565)
Map rendering
- Reduced memory usage by clearing in-memory tile cache before entering background. (#11197)
- Fixed an issue where symbols with empty titles 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
- Fixed an issue where tapping a group of annotations may not have selected the nearest annotation. (#11438)
- The
MGLMapView.selectedAnnotations
property (backed by-[MGLMapView setSelectedAnnotations:]
) now selects annotations that are off-screen. (#9790) - The
animated
parameter to-[MGLMapView selectAnnotation:animated:]
now controls whether the annotation and its callout are brought on-screen. Ifanimated
isNO
then the annotation is selected if offscreen, but the map is not panned. Currently only point annotations are supported. Setting theMGLMapView.selectedAnnotations
property now animates. (#3249) - Fixed a crash when rapidly adding and removing annotations. (#11551, #11575)
Other changes
- The
-[MGLMapView convertRect:toCoordinateBoundsFromView:]
method and theMGLMapView.visibleCoordinateBounds
property’s getter now indicate that the coordinate bounds straddles the antimeridian by extending one side beyond ±180 degrees longitude. (#11265) - 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)
To install this prerelease via CocoaPods, point your Podfile to either of these URLs:
- https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v4.0.0-beta.3/platform/ios/Mapbox-iOS-SDK.podspec
- https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v4.0.0-beta.3/platform/ios/Mapbox-iOS-SDK-symbols.podspec
Documentation is available online or as part of the download.