This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
ios-v3.4.0-beta.5
Pre-release
Pre-release
·
6677 commits
to master
since this release
Changes since ios-v3.4.0-beta.4:
Styles
- Replaced MGLMapView’s
-stylemethod with astyleproperty that complies to key-value coding. (#6097) - Added a
sourcesandlayersproperties to MGLStyle for enumerating the content sources and layers in a style. (#6097) - Added an
-imageForName:method to MGLStyle for accessing an existing style image. (#7096) - After adding a template image to the style using
-[MGLStyle setImage:forName:], you can now set its tint color using MGLSymbolStyleLayer’siconColorproperty. (#7300) - MGLStyle raises an exception when you reuse a source or layer identifier and when you reuse an instance of MGLSource or MGLStyleLayer. (#7227, #7272)
Content sources
- MGLGeoJSONSource has been renamed MGLShapeSource, and its initializers and properties have been streamlined (#7334, #7145):
- The
-initWithIdentifier:features:options:initializer has been replaced by an-initWithIdentifier:shape:options:initializer that can accept any MGLShape object, not just MGLFeature objects. To create a shape source with multiple shapes, use an MGLShapeCollection or MGLShapeCollectionFeature object. - The
-initWithIdentifier:geoJSONData:options:initializer has been removed. To create a shape source from GeoJSON string data, use the+[MGLShape shapeWithData:encoding:error:]method in conjunction with the-[MGLShapeSource initWithIdentifier:shape:options:]initializer. Alternatively, if performance is a concern, pass a local file URL into-[MGLShapeSource initWithIdentifier:URL:options:]. - The
geoJSONDataproperty has been removed. To obtain the GeoJSON representation of the shape source’s shape, use theshapeproperty in conjunction with the-[MGLShape geoJSONDataUsingEncoding:]method.
- The
- MGLTileSet has been removed. Instead, MGLRasterSource and MGLVectorSource are subclasses of MGLTileSource, an abstract class that has initializers and options for working with tile sets. (#7377)
- The action sheet that appears when tapping the information button in the bottom-right corner now lists the correct attribution for the current style. (#5999)
- An
attributionInfosproperty has been added to MGLTileSource for getting the parsed attribution statements instead of the HTML source code that was previously provided by MGLTileSet’sattributionproperty. (#7377)
Style layers
- Added an
-insertLayer:aboveLayer:method to MGLStyle for inserting a new layer above an existing layer. (#6097) - Some style layer properties have been renamed for consistency with Cocoa APIs (#7128, #7310, #7344):
- In MGLLineStyleLayer,
lineDasharrayis nowlineDashPattern. - In MGLRasterStyleLayer,
rasterBrightnessMinandrasterBrightnessMaxare nowminimumRasterBrightnessandmaximumRasterBrightness, respectively, andrasterHueRotateis nowrasterHueRotation. - In MGLSymbolStyleLayer,
iconImageis nowiconImageName, andiconSizeis nowiconScale.
- In MGLLineStyleLayer,
- Added support for the
CONTAINSoperator in style layer predicates. (#7232) - An exception is now raised if MGLStyleFunction is created with no stops. (#7309)
- Various category properties on NSValue have been prefixed with the “MGL” class prefix. For example, the
lineCapproperty is now namedMGLLineCapValue. (#7171)
Annotations and user interaction
- Fixed an issue causing the callout view to be dismissed when panning around. (#6676)
- Added new methods to MGLMultiPoint for replacing or deleting vertices along a polyline annotation or the exterior of a polygon annotation. (#6565)
- The UITapGestureRecognizer on MGLMapView that is used for selecting annotations now fails if a tap does not select an annotation. (#7246)
- Fixed an issue that sometimes caused view-backed annotations close to the edge of the map view to disappear. (#7423)
Other changes
- Added a
+shapeWithData:encoding:error:method to MGLShape that deserializes GeoJSON string data into an MGLShape, MGLFeature, or MGLShapeCollectionFeature object, as well as a-geoJSONDataUsingEncoding:method that serializes the object back into GeoJSON string data. (#7377) - Various method arguments that are represented as C arrays of
CLLocationCoordinate2Dinstances have been markedconstto streamline bridging to Swift. (#7215) - Added a
MGLCoordinateBoundsIntersectsCoordinateBounds()function to determine whether two MGLCoordinateBounds instances intersect one another. (#7251) - Fixed issues related to the visibility of sources in viewports less than 512 pixels wide or tall. (#7438)
To install this prerelease via CocoaPods, point your Podfile to either of these URLs:
- https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v3.4.0-beta.5/platform/ios/Mapbox-iOS-SDK.podspec
- https://raw.githubusercontent.com/mapbox/mapbox-gl-native/ios-v3.4.0-beta.5/platform/ios/Mapbox-iOS-SDK-symbols.podspec.
Documentation is available online or as part of the download.