MGLMapSnapshotterDelegate
@protocol MGLMapSnapshotterDelegate <NSObject>
Optional methods about significant events when creating a snapshot using an MGLMapSnapshotter
object.
-mapSnapshotterDidFail:withError:
Tells the delegate that the snapshotter was unable to load data needed for snapshotting the map.
This method may be called for a variety of reasons, including a network connection failure or a failure to fetch the style from the server. You can use the given error message to notify the user that map data is unavailable.
Declaration
Objective-C
- (void)mapSnapshotterDidFail:(nonnull MGLMapSnapshotter *)snapshotter
withError:(nonnull NSError *)error;
Swift
optional func mapSnapshotterDidFail(_ snapshotter: MGLMapSnapshotter, withError error: Error)
Parameters
snapshotter
The snapshotter that is unable to load the data.
error
The reason the data could not be loaded.
-mapSnapshotter:didFinishLoadingStyle:
Tells the delegate that the snapshotter has just finished loading a style.
This method is called in response to -[MGLMapSnapshotter startWithQueue:completionHandler:]
as long as the MGLMapSnapshotter.delegate
property is set. Changes to sources or layers of the style being snapshotted do not cause this method to be called.
Declaration
Objective-C
- (void)mapSnapshotter:(nonnull MGLMapSnapshotter *)snapshotter
didFinishLoadingStyle:(nonnull MGLStyle *)style;
Swift
optional func mapSnapshotter(_ snapshotter: MGLMapSnapshotter, didFinishLoading style: MGLStyle)
Parameters
snapshotter
The snapshotter that has just loaded a style.
style
The style that was loaded.
iOS SDK
SDK JS Reference
- MGLUserLocationAnnotationViewStyle
- MGLAccountManager
- MGLAnnotationImage
- MGLCircleStyleLayer
- MGLMapSnapshot
- NSValue(MGLHillshadeStyleLayerAdditions)
- MGLLight
- MGLCoordinateSpan
- MGLOfflinePack
- MGLAnnotationVerticalAlignment
- MGLSource
- MGLDEMEncoding
- MGLCoordinateSpan
- MGLMapCamera
- MGLTextWritingMode
- MGLIconTranslationAnchor
- NSValue(MGLSymbolStyleLayerAdditions)
- MGLOfflinePackProgress
- MGLMapSnapshotOptions
- Primitive Shapes
- NSValue(MGLAdditions)
- MGLTextPitchAlignment
- MGLSphericalPosition
- MGLCompassDirectionFormatter
- MGLVectorTileSource
- MGLMapViewDelegate
- MGLHillshadeIlluminationAnchor
- MGLIconTextFit
- MGLLocationManagerDelegate
- MGLShape
- Formatters
- MGLCoordinateBounds
- MGLCoordinateQuad
- MGLMapSnapshotterDelegate
- MGLAnnotationViewDragState
- MGLComputedShapeSource
- NSValue(MGLCircleStyleLayerAdditions)
- MGLHillshadeStyleLayer
- MGLOverlay
- MGLPolygon
- MGLStyleLayer
- MGLTilePyramidOfflineRegion
- MGLMapView
- MGLTransition
- MGLOfflineStorage
- MGLComputedShapeSourceDataSource
- MGLMapDebugMaskOptions
- MGLClockDirectionFormatter
- MGLTextRotationAlignment
- MGLUserTrackingMode
- NSValue(MGLRasterStyleLayerAdditions)
- MGLAttributionInfo
- MGLRasterStyleLayer
- Style Content
- MGLUserLocation
- MGLRasterTileSource
- MGLFillTranslationAnchor
- Other Protocols
- MGLSphericalPosition
- MGLMapSnapshotter
- MGLRasterResamplingMode
- MGLAnnotationView
- MGLResourceKind
- MGLShapeCollection
- Other Enumerations
- NSExpression(MGLAdditions)
- MGLCirclePitchAlignment
- MGLFillExtrusionTranslationAnchor
- Style Layers
- Other Constants
- MGLCoordinateBounds
- Appendices
- MGLLoggingConfiguration
- Other Structures
- MGLMapSnapshotOverlay
- MGLCircleTranslationAnchor
- User Interaction
- NSValue(MGLLineStyleLayerAdditions)
- MGLErrorCode
- MGLAttributedExpression
- MGLSymbolStyleLayer
- MGLCircleScaleAlignment
- MGLTextTransform
- MGLOrnamentVisibility
- MGLMultiPoint
- MGLShapeSource
- MGLLightAnchor
- MGLCalloutViewDelegate
- MGLCluster
- MGLOfflinePackProgress
- MGLPolyline
- MGLFeature
- MGLAnnotation
- MGLFillStyleLayer
- MGLIconRotationAlignment
- NSValue(MGLFillStyleLayerAdditions)
- Other Classes
- MGLLineTranslationAnchor
- MGLTextAnchor
- Offline Maps
- MGLLocationManager
- MGLStyle
- Other Type Definitions
- NSValue(MGLFillExtrusionStyleLayerAdditions)
- Style Primitives
- MGLTileSource
- MGLTransition
- MGLForegroundStyleLayer
- MGLStylable
- MGLIconPitchAlignment
- MGLOfflineRegion
- MGLHeatmapStyleLayer
- MGLCompassButton
- MGLFillExtrusionStyleLayer
- MGLSymbolPlacement
- MGLMultiPolyline
- MGLOfflinePackState
- MGLImageSource
- MGLCoordinateFormatter
- MGLDistanceFormatter
- MGLCoordinateQuad
- MGLPointCollection
- MGLPointAnnotation
- MGLTextJustification
- MGLOfflineStorageDelegate
- MGLCalloutView
- MGLOrnamentPosition
- MGLUserLocationAnnotationView
- MGLTileCoordinateSystem
- MGLSymbolZOrder
- MGLLineCap
- Other Functions
- MGLNetworkConfiguration
- MGLShapeOfflineRegion
- Styling the Map
- MGLLineJoin
- Maps
- MGLAttributionInfoStyle
- MGLIconAnchor
- MGLBackgroundStyleLayer
- MGLMultiPolygon
- Annotations
- MGLVectorStyleLayer
- Location Updates
- MGLTextTranslationAnchor
- MGLLineStyleLayer
- Other Categories
- Geometry
- MGLLoggingLevel