Other Functions
The following functions are available globally.
-
Converts a map scale to a zoom level.
Declaration
Objective-C
NSUInteger AWFMapZoomLevelFromZoomScale(MKZoomScale zoomScale)Swift
func AWFMapZoomLevelFromZoomScale(_ zoomScale: MKZoomScale) -> UIntParameters
zoomScaleThe zoom scale to convert.
Return Value
The zoom level corresponding to the zoom scale.
-
Returns a map coordinate that corresponds to the specified point.
Declaration
Objective-C
CLLocationCoordinate2D AWFMapTilePointToCoordinate(CGPoint point, NSUInteger zoomLevel)Swift
func AWFMapTilePointToCoordinate(_ point: CGPoint, _ zoomLevel: UInt) -> CLLocationCoordinate2DParameters
pointThe point to convert.
zoomLevelThe zoom level to use when converting to map coordinates.
Return Value
The map coordinate at the point.
-
Returns tile x and y indexes that contain the map point.
Declaration
Objective-C
CGPoint AWFMapPointToTilePoint(MKMapPoint mapPoint, NSUInteger zoomLevel)Swift
func AWFMapPointToTilePoint(_ mapPoint: MKMapPoint, _ zoomLevel: UInt) -> CGPointParameters
mapPointThe map point to convert.
zoomLevelThe zoom level to use when calculating tile indexes.
Return Value
The tile x and y indexes that contain the map point.
-
Returns tile x and y indexes that contain the map coordinate.
Declaration
Objective-C
CGPoint AWFMapTilePointFromCoordinate(CLLocationCoordinate2D coord, NSUInteger zoomLevel)Swift
func AWFMapTilePointFromCoordinate(_ coord: CLLocationCoordinate2D, _ zoomLevel: UInt) -> CGPointParameters
coordThe map coordinate to convert.
zoomLevelThe zoom level to use when calculating the tile indexes.
Return Value
The tile x and y indexes that contain the map coordinate.
View on GitHub
Other Functions Reference