Skip to content
This repository was archived by the owner on Aug 8, 2023. It is now read-only.

ios-v3.4.0-beta.5

Pre-release
Pre-release

Choose a tag to compare

@boundsj boundsj released this 14 Dec 22:14
· 6677 commits to master since this release

Changes since ios-v3.4.0-beta.4:

Styles

  • Replaced MGLMapView’s -style method with a style property that complies to key-value coding. (#6097)
  • Added a sources and layers properties 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’s iconColor property. (#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 geoJSONData property has been removed. To obtain the GeoJSON representation of the shape source’s shape, use the shape property in conjunction with the -[MGLShape geoJSONDataUsingEncoding:] method.
  • 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 attributionInfos property has been added to MGLTileSource for getting the parsed attribution statements instead of the HTML source code that was previously provided by MGLTileSet’s attribution property. (#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, lineDasharray is now lineDashPattern.
    • In MGLRasterStyleLayer, rasterBrightnessMin and rasterBrightnessMax are now minimumRasterBrightness and maximumRasterBrightness, respectively, and rasterHueRotate is now rasterHueRotation.
    • In MGLSymbolStyleLayer, iconImage is now iconImageName, and iconSize is now iconScale.
  • Added support for the CONTAINS operator 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 lineCap property is now named MGLLineCapValue. (#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 CLLocationCoordinate2D instances have been marked const to 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:

Documentation is available online or as part of the download.