Other Type Definitions
The following type definitions are available globally.
MGLAttributedExpressionKey
Options for MGLAttributedExpression.attributes
.
Declaration
Objective-C
typedef NSString *MGLAttributedExpressionKey
Swift
struct MGLAttributedExpressionKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
MGLSphericalPosition
A structure containing information about the position of the light source relative to lit geometries.
Declaration
Objective-C
typedef struct MGLSphericalPosition MGLSphericalPosition
MGLLoggingBlockHandler
A block to be called once loggingLevel
is set to a higher value than MGLLoggingLevelNone
.
Declaration
Objective-C
typedef void (^MGLLoggingBlockHandler)(MGLLoggingLevel, NSString *_Nonnull,
NSUInteger, NSString *_Nonnull)
Swift
typealias MGLLoggingBlockHandler = (MGLLoggingLevel, String, UInt, String) -> Void
Parameters
loggingLevel
The message logging level.
filePath
The description of the file and method for the calling message.
line
The line where the message is logged.
message
The logging message.
MGLMapSnapshotOverlayHandler
A block provided during the snapshot drawing process, enabling the ability to draw custom overlays rendered with Core Graphics.
Declaration
Objective-C
typedef void (^MGLMapSnapshotOverlayHandler)(MGLMapSnapshotOverlay *_Nonnull)
Swift
typealias MGLMapSnapshotOverlayHandler = (MGLMapSnapshotOverlay) -> Void
Parameters
snapshotOverlay
The MGLMapSnapshotOverlay
provided during snapshot drawing.
MGLMapSnapshotCompletionHandler
A block to processes the result or error of a snapshot request.
Declaration
Objective-C
typedef void (^MGLMapSnapshotCompletionHandler)(MGLMapSnapshot *_Nullable,
NSError *_Nullable)
Swift
typealias MGLMapSnapshotCompletionHandler = (MGLMapSnapshot?, Error?) -> Void
Parameters
snapshot
The MGLMapSnapshot
that was generated or nil
if an error occurred.
error
The error that occured or nil
when successful.
MGLOfflinePackUserInfoKey
A key in the userInfo
property of a notification posted by MGLOfflinePack
.
Declaration
Objective-C
typedef NSString *MGLOfflinePackUserInfoKey
Swift
struct MGLOfflinePackUserInfoKey : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
MGLOfflinePackAdditionCompletionHandler
A block to be called once an offline pack has been completely created and added.
An application typically calls the -resume
method on the pack inside this completion handler to begin the download.
Declaration
Objective-C
typedef void (^MGLOfflinePackAdditionCompletionHandler)(
MGLOfflinePack *_Nullable, NSError *_Nullable)
Swift
typealias MGLOfflinePackAdditionCompletionHandler = (MGLOfflinePack?, Error?) -> Void
Parameters
pack
Contains a pointer to the newly added pack, or nil
if there was an error creating or adding the pack.
error
Contains a pointer to an error object (if any) indicating why the pack could not be created or added.
MGLOfflinePackRemovalCompletionHandler
A block to be called once an offline pack has been completely invalidated and removed.
Avoid any references to the pack inside this completion handler: by the time this completion handler is executed, the pack has become invalid, and any messages passed to it will raise an exception.
Declaration
Objective-C
typedef void (^MGLOfflinePackRemovalCompletionHandler)(NSError *_Nullable)
Swift
typealias MGLOfflinePackRemovalCompletionHandler = (Error?) -> Void
Parameters
error
Contains a pointer to an error object (if any) indicating why the pack could not be invalidated or removed.
MGLBatchedOfflinePackAdditionCompletionHandler
A block to be called once the contents of a file are copied into the current packs.
Declaration
Objective-C
typedef void (^MGLBatchedOfflinePackAdditionCompletionHandler)(
NSURL *_Nonnull, NSArray<MGLOfflinePack *> *_Nullable, NSError *_Nullable)
Swift
typealias MGLBatchedOfflinePackAdditionCompletionHandler = (URL, [MGLOfflinePack]?, Error?) -> Void
Parameters
fileURL
The file URL of the offline database containing the offline packs that were copied.
packs
An array of all known offline packs, or nil
if there was an error creating or adding the pack.
error
A pointer to an error object (if any) indicating why the pack could not be created or added.
MGLOfflinePreloadDataCompletionHandler
A block to be called once the data has been preloaded.
Declaration
Objective-C
typedef void (^MGLOfflinePreloadDataCompletionHandler)(NSURL *_Nonnull,
NSError *_Nullable)
Swift
typealias MGLOfflinePreloadDataCompletionHandler = (URL, Error?) -> Void
Parameters
url
The URL of the data that was pre-loaded.
error
Contains a pointer to an error object (if any) indicating why the data could not be pre-loaded.
MGLShapeSourceOption
Options for MGLShapeSource
objects.
Declaration
Objective-C
typedef NSString *MGLShapeSourceOption
Swift
struct MGLShapeSourceOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
MGLTileSourceOption
Options for MGLTileSource
objects.
Declaration
Objective-C
typedef NSString *MGLTileSourceOption
Swift
struct MGLTileSourceOption : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
MGLTransition
A structure containing information about a transition.
Declaration
Objective-C
typedef struct MGLTransition MGLTransition
MGLMapViewDecelerationRate
Options for MGLMapView.decelerationRate
.
Declaration
Objective-C
typedef CGFloat MGLMapViewDecelerationRate
Swift
struct MGLMapViewDecelerationRate : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
MGLMapViewPreferredFramesPerSecond
Options for MGLMapView.preferredFramesPerSecond
.
Declaration
Objective-C
typedef NSInteger MGLMapViewPreferredFramesPerSecond
Swift
struct MGLMapViewPreferredFramesPerSecond : _ObjectiveCBridgeable, Hashable, Equatable, _SwiftNewtypeWrapper, RawRepresentable
iOS SDK
Examples
SDK JS Reference
- Annotations
- Appendices
- NSExpression(MGLAdditions)
- NSValue(MGLAdditions)
- NSValue(MGLCircleStyleLayerAdditions)
- NSValue(MGLFillExtrusionStyleLayerAdditions)
- NSValue(MGLFillStyleLayerAdditions)
- NSValue(MGLHillshadeStyleLayerAdditions)
- NSValue(MGLLineStyleLayerAdditions)
- NSValue(MGLRasterStyleLayerAdditions)
- NSValue(MGLSymbolStyleLayerAdditions)
- MGLAccountManager
- MGLAnnotationImage
- MGLAnnotationView
- MGLAttributedExpression
- MGLAttributionInfo
- MGLBackgroundStyleLayer
- MGLCircleStyleLayer
- MGLClockDirectionFormatter
- MGLCompassButton
- MGLCompassDirectionFormatter
- MGLComputedShapeSource
- MGLCoordinateFormatter
- MGLDistanceFormatter
- MGLFillExtrusionStyleLayer
- MGLFillStyleLayer
- MGLForegroundStyleLayer
- MGLHeatmapStyleLayer
- MGLHillshadeStyleLayer
- MGLImageSource
- MGLLight
- MGLLineStyleLayer
- MGLLoggingConfiguration
- MGLMapCamera
- MGLMapSnapshot
- MGLMapSnapshotOptions
- MGLMapSnapshotOverlay
- MGLMapSnapshotter
- MGLMapView
- MGLMultiPoint
- MGLMultiPolygon
- MGLMultiPolyline
- MGLNetworkConfiguration
- MGLOfflinePack
- MGLOfflineStorage
- MGLPointAnnotation
- MGLPointCollection
- MGLPolygon
- MGLPolyline
- MGLRasterStyleLayer
- MGLRasterTileSource
- MGLShape
- MGLShapeCollection
- MGLShapeOfflineRegion
- MGLShapeSource
- MGLSource
- MGLStyle
- MGLStyleLayer
- MGLSymbolStyleLayer
- MGLTilePyramidOfflineRegion
- MGLTileSource
- MGLUserLocation
- MGLUserLocationAnnotationView
- MGLUserLocationAnnotationViewStyle
- MGLVectorStyleLayer
- MGLVectorTileSource
- MGLAnnotationVerticalAlignment
- MGLAnnotationViewDragState
- MGLAttributionInfoStyle
- MGLCirclePitchAlignment
- MGLCircleScaleAlignment
- MGLCircleTranslationAnchor
- MGLDEMEncoding
- MGLErrorCode
- MGLFillExtrusionTranslationAnchor
- MGLFillTranslationAnchor
- MGLHillshadeIlluminationAnchor
- MGLIconAnchor
- MGLIconPitchAlignment
- MGLIconRotationAlignment
- MGLIconTextFit
- MGLIconTranslationAnchor
- MGLLightAnchor
- MGLLineCap
- MGLLineJoin
- MGLLineTranslationAnchor
- MGLLoggingLevel
- MGLMapDebugMaskOptions
- MGLOfflinePackState
- MGLOrnamentPosition
- MGLOrnamentVisibility
- MGLRasterResamplingMode
- MGLResourceKind
- MGLSymbolPlacement
- MGLSymbolZOrder
- MGLTextAnchor
- MGLTextJustification
- MGLTextPitchAlignment
- MGLTextRotationAlignment
- MGLTextTransform
- MGLTextTranslationAnchor
- MGLTextWritingMode
- MGLTileCoordinateSystem
- MGLUserTrackingMode
- Formatters
- Geometry
- Location Updates
- Maps
- Offline Maps
- Other Categories
- Other Classes
- Other Constants
- Other Enumerations
- Other Functions
- Other Protocols
- Other Structures
- Other Type Definitions
- Primitive Shapes
- MGLAnnotation
- MGLCalloutView
- MGLCalloutViewDelegate
- MGLCluster
- MGLComputedShapeSourceDataSource
- MGLFeature
- MGLLocationManager
- MGLLocationManagerDelegate
- MGLMapSnapshotterDelegate
- MGLMapViewDelegate
- MGLOfflineRegion
- MGLOfflineStorageDelegate
- MGLOverlay
- MGLStylable
- MGLCoordinateBounds
- MGLCoordinateQuad
- MGLCoordinateSpan
- MGLOfflinePackProgress
- MGLSphericalPosition
- MGLTransition
- Style Content
- Style Layers
- Style Primitives
- Styling the Map
- MGLCoordinateBounds
- MGLCoordinateQuad
- MGLCoordinateSpan
- MGLOfflinePackProgress
- MGLSphericalPosition
- MGLTransition
- User Interaction
- Customizing Fonts
- Information for Style Authors
- Gesture Recognizers
- Info.plist Keys
- Migrating to Expressions
- Predicates and expressions
- Tile URL Templates
- Working with GeoJSON Data