MGLErrorCode
enum MGLErrorCode {}
Error constants for the Mapbox SDK.
MGLErrorCodeUnknown
An unknown error occurred.
Declaration
Objective-C
MGLErrorCodeUnknown = -1
Swift
case unknown = -1
MGLErrorCodeNotFound
The resource could not be found.
Declaration
Objective-C
MGLErrorCodeNotFound = 1
Swift
case notFound = 1
MGLErrorCodeBadServerResponse
The connection received an invalid server response.
Declaration
Objective-C
MGLErrorCodeBadServerResponse = 2
Swift
case badServerResponse = 2
MGLErrorCodeConnectionFailed
An attempt to establish a connection failed.
Declaration
Objective-C
MGLErrorCodeConnectionFailed = 3
Swift
case connectionFailed = 3
MGLErrorCodeParseStyleFailed
A style parse error occurred while attempting to load the map.
Declaration
Objective-C
MGLErrorCodeParseStyleFailed = 4
Swift
case parseStyleFailed = 4
MGLErrorCodeLoadStyleFailed
An attempt to load the style failed.
Declaration
Objective-C
MGLErrorCodeLoadStyleFailed = 5
Swift
case loadStyleFailed = 5
MGLErrorCodeSnapshotFailed
An error occurred while snapshotting the map.
Declaration
Objective-C
MGLErrorCodeSnapshotFailed = 6
Swift
case snapshotFailed = 6
MGLErrorCodeSourceIsInUseCannotRemove
Source is in use and cannot be removed
Declaration
Objective-C
MGLErrorCodeSourceIsInUseCannotRemove = 7
Swift
case sourceIsInUseCannotRemove = 7
MGLErrorCodeSourceIdentifierMismatch
Source is in use and cannot be removed
Declaration
Objective-C
MGLErrorCodeSourceIdentifierMismatch = 8
Swift
case sourceIdentifierMismatch = 8
MGLErrorCodeModifyingOfflineStorageFailed
An error occurred while modifying the offline storage database
Declaration
Objective-C
MGLErrorCodeModifyingOfflineStorageFailed = 9
Swift
case modifyingOfflineStorageFailed = 9
MGLErrorCodeSourceCannotBeRemovedFromStyle
Source is invalid and cannot be removed from the style (e.g. after a style change)
Declaration
Objective-C
MGLErrorCodeSourceCannotBeRemovedFromStyle = 10
Swift
case sourceCannotBeRemovedFromStyle = 10
MGLErrorCodeRenderingError
An error occurred while rendering
Declaration
Objective-C
MGLErrorCodeRenderingError = 11
Swift
case renderingError = 11
iOS SDK
Examples
SDK JS Reference
- MGLAnnotationImage
- MGLErrorCode
- MGLNetworkConfiguration
- MGLCircleStyleLayer
- MGLUserTrackingMode
- MGLTransition
- MGLCoordinateFormatter
- MGLImageSource
- MGLOrnamentPosition
- MGLAnnotation
- Other Type Definitions
- MGLAnnotationViewDragState
- NSValue(MGLCircleStyleLayerAdditions)
- MGLPolyline
- MGLCoordinateQuad
- MGLDEMEncoding
- Styling the Map
- MGLAttributionInfoStyle
- MGLTextTranslationAnchor
- MGLSymbolPlacement
- MGLOfflineStorage
- MGLHillshadeStyleLayer
- Other Functions
- MGLCompassButton
- MGLAttributionInfo
- MGLHeatmapStyleLayer
- Other Categories
- MGLSphericalPosition
- MGLCirclePitchAlignment
- User Interaction
- Location Updates
- MGLSphericalPosition
- Offline Maps
- MGLSymbolZOrder
- MGLIconRotationAlignment
- MGLLightAnchor
- MGLLocationManagerDelegate
- MGLAttributedExpression
- MGLLight
- MGLStyleLayer
- NSExpression(MGLAdditions)
- MGLAccountManager
- MGLShapeOfflineRegion
- Geometry
- MGLHillshadeIlluminationAnchor
- Info.plist Keys
- MGLBackgroundStyleLayer
- MGLSource
- MGLSymbolStyleLayer
- MGLResourceKind
- MGLCoordinateSpan
- MGLOrnamentVisibility
- NSValue(MGLFillExtrusionStyleLayerAdditions)
- NSValue(MGLHillshadeStyleLayerAdditions)
- MGLOfflineStorageDelegate
- MGLCluster
- Appendices
- MGLUserLocationAnnotationViewStyle
- NSValue(MGLLineStyleLayerAdditions)
- MGLStyle
- MGLMapSnapshotterDelegate
- MGLTextWritingMode
- MGLRasterResamplingMode
- MGLUserLocation
- MGLOfflinePackProgress
- MGLFillExtrusionTranslationAnchor
- MGLForegroundStyleLayer
- MGLLoggingConfiguration
- MGLTilePyramidOfflineRegion
- MGLRasterTileSource
- MGLAnnotationView
- Working with GeoJSON Data
- MGLVectorStyleLayer
- MGLMapSnapshotOptions
- MGLMapViewDelegate
- MGLMapDebugMaskOptions
- MGLMapSnapshotOverlay
- MGLIconTranslationAnchor
- Other Enumerations
- Other Protocols
- MGLTextRotationAlignment
- MGLUserLocationAnnotationView
- MGLTextPitchAlignment
- MGLCalloutViewDelegate
- Annotations
- MGLLineTranslationAnchor
- MGLShapeSource
- NSValue(MGLSymbolStyleLayerAdditions)
- MGLOfflinePackState
- MGLTextJustification
- Other Classes
- MGLMapSnapshotter
- MGLIconPitchAlignment
- MGLComputedShapeSource
- MGLRasterStyleLayer
- MGLCoordinateQuad
- MGLFeature
- MGLComputedShapeSourceDataSource
- MGLOfflineRegion
- MGLLineCap
- MGLLoggingLevel
- MGLFillExtrusionStyleLayer
- Style Content
- NSValue(MGLFillStyleLayerAdditions)
- NSValue(MGLRasterStyleLayerAdditions)
- MGLLocationManager
- MGLMapCamera
- MGLIconTextFit
- MGLLineStyleLayer
- MGLPointCollection
- MGLMultiPolygon
- MGLCircleTranslationAnchor
- Other Structures
- MGLFillStyleLayer
- MGLShapeCollection
- Primitive Shapes
- MGLTransition
- Information for Style Authors
- MGLLineJoin
- MGLPointAnnotation
- MGLTileSource
- MGLVectorTileSource
- MGLCoordinateBounds
- Gesture Recognizers
- NSValue(MGLAdditions)
- MGLCompassDirectionFormatter
- MGLIconAnchor
- Migrating to Expressions
- MGLPolygon
- MGLDistanceFormatter
- MGLFillTranslationAnchor
- MGLTextTransform
- MGLMultiPoint
- Customizing Fonts
- Maps
- MGLClockDirectionFormatter
- MGLCalloutView
- MGLTextAnchor
- MGLCircleScaleAlignment
- MGLCoordinateSpan
- MGLMapSnapshot
- MGLStylable
- MGLShape
- MGLOfflinePackProgress
- Style Primitives
- Predicates and expressions
- Formatters
- MGLMultiPolyline
- MGLTileCoordinateSystem
- MGLAnnotationVerticalAlignment
- MGLOverlay
- MGLCoordinateBounds
- Tile URL Templates
- MGLOfflinePack
- Style Layers
- MGLMapView
- Other Constants