mgrs-ios 1.1.6 Documentation

Class MGRSTile​Overlay

public class MGRSTileOverlay: MKTileOverlay  
  • MGRS Tile Overlay
MGRSTileOverlay MGRSTileOverlay MKTileOverlay MKTileOverlay MGRSTileOverlay->MKTileOverlay

Conforms To

MKTileOverlay

Initializers

init()

public init()  
  • Initialize
  • @param context app context

init(_:​)

public init(_ types: [GridType])  
  • Initialize
  • @param types grids types to enable

init(_:​)

public init(_ grids: Grids)  
  • Initialize
  • @param grids grids

init(_:​)

public init(_ tileLength: Int)  
  • Initialize
  • @param tileLength tile width and height

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

tile​Width

public var tileWidth: Int
  • Tile width

tile​Height

public var tileHeight: Int
  • Tile height

grids

public var grids: Grids
  • Grids

Methods

create​GZD()

public static func createGZD() -> MGRSTileOverlay  
  • Create a tile provider with Grid Zone Designator grids
  • @return tile provider

create​GZD(_:​)

public static func createGZD(_ tileLength: Int) -> MGRSTileOverlay  
  • Create a tile provider with Grid Zone Designator grids
  • @param tileLength tile length
  • @return tile provider

create​GZD(_:​_:​)

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(for​Tile​Path:​)

public override func url(forTilePath path: MKTileOverlayPath) -> URL  

load​Tile(at:​result:​)

public override func loadTile(at path: MKTileOverlayPath, result: @escaping (Data?, Error?) -> Void)  

grid(_:​)

public func grid(_ type: GridType) -> 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

parse​ToCoordinate(_:​)

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

draw​Tile(_:​_:​_:​)

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