Class
MGRSTileOverlay
public class MGRSTileOverlay: MKTileOverlay
- MGRS Tile Overlay
Relationships
Conforms To
MKTileOverlay
Initializers
init(_:_:)
public init(_ tileLength: Int, _ types: [GridType])
- Initialize
- @param tileLength tile width and height
- @param types grids types to enable
init(_:_:)
public init(_ tileLength: Int, _ grids: Grids)
- Initialize
- @param tileLength tile width and height
- @param grids grids
init(_:_:)
public init(_ tileWidth: Int, _ tileHeight: Int)
- Initialize
- @param tileWidth tile width
- @param tileHeight tile height
init(_:_:_:)
public init(_ tileWidth: Int, _ tileHeight: Int, _ types: [GridType])
- Initialize
- @param tileWidth tile width
- @param tileHeight tile height
- @param types grids types to enable
init(_:_:_:)
public init(_ tileWidth: Int, _ tileHeight: Int, _ grids: Grids)
- Initialize
- @param tileWidth tile width
- @param tileHeight tile height
- @param grids grids
Properties
Methods
createGZD()
public static func createGZD() -> MGRSTileOverlay
- Create a tile provider with Grid Zone Designator grids
- @return tile provider
createGZD(_:)
public static func createGZD(_ tileLength: Int) -> MGRSTileOverlay
- Create a tile provider with Grid Zone Designator grids
- @param tileLength tile length
- @return tile provider
createGZD(_:_:)
public static func createGZD(_ tileWidth: Int, _ tileHeight: Int) -> MGRSTileOverlay
- Create a tile provider with Grid Zone Designator grids
- @param tileWidth tile width
- @param tileHeight tile height
- @return tile provider
url(forTilePath:)
public override func url(forTilePath path: MKTileOverlayPath) -> URL
loadTile(at:result:)
public override func loadTile(at path: MKTileOverlayPath, result: @escaping (Data?, Error?) -> Void)
grid(_:)
- Get the grid
- @param type grid type
- @return grid
coordinate(_:)
public func coordinate(_ coordinate: CLLocationCoordinate2D) -> String
- Get the Global Area Reference System coordinate for the location coordinate in five
- minute precision
- @param coordinate location
- @return MGRS coordinate
coordinate(_:)
public func coordinate(_ point: MKMapPoint) -> String
- Get the Global Area Reference System coordinate for the MapKit map point in five
- minute precision
- @param point MapKit map point
- @return MGRS coordinate
coordinate(_:_:)
public func coordinate(_ coordinate: CLLocationCoordinate2D, _ zoom: Int) -> String
- Get the Global Area Reference System coordinate for the location coordinate in the
- zoom level precision
- @param coordinate location
- @param zoom zoom level precision
- @return MGRS coordinate
coordinate(_:_:)
public func coordinate(_ point: MKMapPoint, _ zoom: Int) -> String
- Get the Global Area Reference System coordinate for the MapKit map point in the
- zoom level precision
- @param point MapKit map point
- @param zoom zoom level precision
- @return MGRS coordinate
coordinate(_:_:)
public func coordinate(_ coordinate: CLLocationCoordinate2D, _ type: GridType?) -> String
- Get the Global Area Reference System coordinate for the location coordinate in the
- grid type precision
- @param coordinate location
- @param type grid type precision
- @return MGRS coordinate
coordinate(_:_:)
public func coordinate(_ point: MKMapPoint, _ type: GridType?) -> String
- Get the Global Area Reference System coordinate for the MapKit map point in the
- grid type precision
- @param point MapKit map point
- @param type grid type precision
- @return MGRS coordinate
mgrs(_:)
public func mgrs(_ coordinate: CLLocationCoordinate2D) -> MGRS
- Get the Global Area Reference System for the location coordinate
- @param coordinate location
- @return MGRS
mgrs(_:)
public func mgrs(_ point: MKMapPoint) -> MGRS
- Get the Global Area Reference System for the MapKit map point
- @param point MapKit map point
- @return MGRS
parse(_:)
public static func parse(_ mgrs: String) -> MGRS
- Parse a MGRS string
- @param mgrs
-
MGRS string
- @return MGRS
parseToCoordinate(_:)
public static func parseToCoordinate(_ mgrs: String) -> CLLocationCoordinate2D
- Parse a MGRS string into a location coordinate
- @param mgrs
-
MGRS string
- @return coordinate
precision(_:)
public func precision(_ zoom: Int) -> GridType?
- Get the grid precision for the zoom level
- @param zoom zoom level
- @return grid type precision
tile(_:_:_:)
public func tile(_ x: Int, _ y: Int, _ zoom: Int) -> Data?
- Get the tile
- @param x x coordinate
- @param y y coordinate
- @param zoom zoom level
- @return image
drawTile(_:_:_:)
public func drawTile(_ x: Int, _ y: Int, _ zoom: Int) -> UIImage?
- Draw the tile
- @param x x coordinate
- @param y y coordinate
- @param zoom zoom level
- @return image