gars-ios 1.1.5 Documentation

Class GARSTile​Overlay

public class GARSTileOverlay: MKTileOverlay  
  • GARS Tile Overlay
GARSTileOverlay GARSTileOverlay MKTileOverlay MKTileOverlay GARSTileOverlay->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

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 GARS 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 GARS 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 GARS 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 GARS 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 GARS 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 GARS coordinate

gars(_:​)

public func gars(_ coordinate: CLLocationCoordinate2D) -> GARS  
  • Get the Global Area Reference System for the location coordinate
  • @param coordinate location
  • @return GARS

gars(_:​)

public func gars(_ point: MKMapPoint) -> GARS  
  • Get the Global Area Reference System for the MapKit map point
  • @param point MapKit map point
  • @return GARS

parse(_:​)

public static func parse(_ gars: String) -> GARS  
  • Parse a GARS string
  • @param gars
  •        GARS string
    
  • @return GARS

parse​ToCoordinate(_:​)

public static func parseToCoordinate(_ gars: String) -> CLLocationCoordinate2D  
  • Parse a GARS string into a location coordinate
  • @param gars
  •        GARS 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