Geometry
MGLCoordinateBounds
A rectangular area as measured on a two-dimensional map projection.
Declaration
Objective-C
struct MGLCoordinateBounds {}
Swift
struct MGLCoordinateBounds
MGLCoordinateBounds
A rectangular area as measured on a two-dimensional map projection.
Declaration
Objective-C
typedef struct MGLCoordinateBounds MGLCoordinateBounds
MGLCoordinateBoundsEqualToCoordinateBounds
Returns YES
if the two coordinate bounds are equal to each other.
Declaration
Objective-C
static inline BOOL
MGLCoordinateBoundsEqualToCoordinateBounds(MGLCoordinateBounds bounds1,
MGLCoordinateBounds bounds2)
Swift
func MGLCoordinateBoundsEqualToCoordinateBounds(_ bounds1: MGLCoordinateBounds, _ bounds2: MGLCoordinateBounds) -> Bool
MGLCoordinateBoundsGetCoordinateSpan
Returns the area spanned by the coordinate bounds.
Declaration
Objective-C
static inline MGLCoordinateSpan
MGLCoordinateBoundsGetCoordinateSpan(MGLCoordinateBounds bounds)
Swift
func MGLCoordinateBoundsGetCoordinateSpan(_ bounds: MGLCoordinateBounds) -> MGLCoordinateSpan
MGLCoordinateBoundsIntersectsCoordinateBounds
Returns YES
if the two coordinate bounds intersect.
Declaration
Objective-C
static inline BOOL
MGLCoordinateBoundsIntersectsCoordinateBounds(MGLCoordinateBounds bounds1,
MGLCoordinateBounds bounds2)
Swift
func MGLCoordinateBoundsIntersectsCoordinateBounds(_ bounds1: MGLCoordinateBounds, _ bounds2: MGLCoordinateBounds) -> Bool
MGLCoordinateBoundsIsEmpty
Returns YES
if the coordinate bounds covers no area.
Note
A bounds may be empty but have a non-zero coordinate span (e.g., when its northeast point lies due north of its southwest point).
Declaration
Objective-C
static inline BOOL MGLCoordinateBoundsIsEmpty(MGLCoordinateBounds bounds)
Swift
func MGLCoordinateBoundsIsEmpty(_ bounds: MGLCoordinateBounds) -> Bool
MGLCoordinateBoundsMake
Creates a new MGLCoordinateBounds
structure from the given southwest and northeast coordinates.
Declaration
Objective-C
static inline MGLCoordinateBounds
MGLCoordinateBoundsMake(CLLocationCoordinate2D sw, CLLocationCoordinate2D ne)
Swift
func MGLCoordinateBoundsMake(_ sw: CLLocationCoordinate2D, _ ne: CLLocationCoordinate2D) -> MGLCoordinateBounds
MGLCoordinateBoundsOffset
Returns a coordinate bounds with southwest and northeast coordinates that are offset from those of the source bounds.
Declaration
Objective-C
static inline MGLCoordinateBounds
MGLCoordinateBoundsOffset(MGLCoordinateBounds bounds, MGLCoordinateSpan offset)
Swift
func MGLCoordinateBoundsOffset(_ bounds: MGLCoordinateBounds, _ offset: MGLCoordinateSpan) -> MGLCoordinateBounds
MGLCoordinateInCoordinateBounds
Returns YES
if the coordinate is within the coordinate bounds.
Declaration
Objective-C
static inline BOOL
MGLCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate,
MGLCoordinateBounds bounds)
Swift
func MGLCoordinateInCoordinateBounds(_ coordinate: CLLocationCoordinate2D, _ bounds: MGLCoordinateBounds) -> Bool
MGLCoordinateQuad
A quadrilateral area as measured on a two-dimensional map projection. MGLCoordinateQuad
differs from MGLCoordinateBounds
in that it allows representation of non-axis aligned bounds and non-rectangular quadrilaterals. The coordinates are described in counter clockwise order from top left.
Declaration
Objective-C
struct MGLCoordinateQuad {}
Swift
struct MGLCoordinateQuad
MGLCoordinateQuad
A quadrilateral area as measured on a two-dimensional map projection. MGLCoordinateQuad
differs from MGLCoordinateBounds
in that it allows representation of non-axis aligned bounds and non-rectangular quadrilaterals. The coordinates are described in counter clockwise order from top left.
Declaration
Objective-C
typedef struct MGLCoordinateQuad MGLCoordinateQuad
MGLCoordinateQuadMake
Creates a new MGLCoordinateQuad
structure from the given top left, bottom left, bottom right, and top right coordinates.
Declaration
Objective-C
static inline MGLCoordinateQuad MGLCoordinateQuadMake(
CLLocationCoordinate2D topLeft, CLLocationCoordinate2D bottomLeft,
CLLocationCoordinate2D bottomRight, CLLocationCoordinate2D topRight)
Swift
func MGLCoordinateQuadMake(_ topLeft: CLLocationCoordinate2D, _ bottomLeft: CLLocationCoordinate2D, _ bottomRight: CLLocationCoordinate2D, _ topRight: CLLocationCoordinate2D) -> MGLCoordinateQuad
MGLCoordinateQuadFromCoordinateBounds
Creates a new MGLCoordinateQuad
structure from the given MGLCoordinateBounds
. The returned quad uses the bounds’ northeast coordinate as the top right, and the southwest coordinate at the bottom left.
Declaration
Objective-C
static inline MGLCoordinateQuad
MGLCoordinateQuadFromCoordinateBounds(MGLCoordinateBounds bounds)
Swift
func MGLCoordinateQuadFromCoordinateBounds(_ bounds: MGLCoordinateBounds) -> MGLCoordinateQuad
MGLCoordinateSpan
Defines the area spanned by an MGLCoordinateBounds
.
Declaration
Objective-C
struct MGLCoordinateSpan {}
Swift
struct MGLCoordinateSpan
MGLCoordinateSpan
Defines the area spanned by an MGLCoordinateBounds
.
Declaration
Objective-C
typedef struct MGLCoordinateSpan MGLCoordinateSpan
MGLCoordinateSpanEqualToCoordinateSpan
Returns YES
if the two coordinate spans represent the same latitudinal change and the same longitudinal change.
Declaration
Objective-C
static inline BOOL
MGLCoordinateSpanEqualToCoordinateSpan(MGLCoordinateSpan span1,
MGLCoordinateSpan span2)
Swift
func MGLCoordinateSpanEqualToCoordinateSpan(_ span1: MGLCoordinateSpan, _ span2: MGLCoordinateSpan) -> Bool
MGLCoordinateSpanMake
Creates a new MGLCoordinateSpan
from the given latitudinal and longitudinal deltas.
Declaration
Objective-C
static inline MGLCoordinateSpan
MGLCoordinateSpanMake(CLLocationDegrees latitudeDelta,
CLLocationDegrees longitudeDelta)
Swift
func MGLCoordinateSpanMake(_ latitudeDelta: CLLocationDegrees, _ longitudeDelta: CLLocationDegrees) -> MGLCoordinateSpan
MGLCoordinateSpanZero
An area of zero width and zero height.
Declaration
Objective-C
extern const MGLCoordinateSpan MGLCoordinateSpanZero
Swift
let MGLCoordinateSpanZero: MGLCoordinateSpan
MGLDegreesFromRadians
Returns degrees, converted from radians.
Declaration
Objective-C
static inline CLLocationDegrees MGLDegreesFromRadians(CGFloat radians)
Swift
func MGLDegreesFromRadians(_ radians: CGFloat) -> CLLocationDegrees
MGLRadiansFromDegrees
Returns radians, converted from degrees.
Declaration
Objective-C
static inline CGFloat MGLRadiansFromDegrees(CLLocationDegrees degrees)
Swift
func MGLRadiansFromDegrees(_ degrees: CLLocationDegrees) -> CGFloat
MGLStringFromCoordinateBounds
Returns a formatted string for the given coordinate bounds.
Declaration
Objective-C
static inline NSString *_Nonnull MGLStringFromCoordinateBounds(
MGLCoordinateBounds bounds)
Swift
func MGLStringFromCoordinateBounds(_ bounds: MGLCoordinateBounds) -> String
MGLStringFromCoordinateQuad
Returns a formatted string for the given coordinate quad.
Declaration
Objective-C
static inline NSString *_Nonnull MGLStringFromCoordinateQuad(
MGLCoordinateQuad quad)
Swift
func MGLStringFromCoordinateQuad(_ quad: MGLCoordinateQuad) -> String
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