mgrs-ios 1.1.6 Documentation

Class Grid

public class Grid: BaseGrid  
  • Grid
Grid Grid BaseGrid BaseGrid Grid->BaseGrid

Superclass

BaseGrid

Initializers

init(_:​)

public init(_ type: GridType)  
  • Initialize
  • @param type
  •        grid type
    

Properties

DEFAULT_WIDTH

public static let DEFAULT_WIDTH  
  • Default line width

type

public let type: GridType
  • Grid type

Methods

is​Type(_:​)

public func isType(_ type: GridType) -> Bool  
  • Is the provided grid type
  • @param type
  •        grid type
    
  • @return true if the type

precision()

public func precision() -> Int  
  • Get the precision in meters
  • @return precision meters

style(_:​)

public func style(_ gridType: GridType) -> GridStyle?  
  • Get the grid type precision line style for the grid type
  • @param gridType
  •        grid type
    
  • @return grid type line style

set​Style(_:​_:​)

public func setStyle(_ gridType: GridType, _ style: GridStyle?)  
  • Set the grid type precision line style
  • @param gridType
  •        grid type
    
  • @param style
  •        grid line style
    

clear​Precision​Styles()

public func clearPrecisionStyles()  
  • Clear the propagated grid type precision styles

color(_:​)

public func color(_ gridType: GridType) -> UIColor?  
  • Get the grid type precision line color
  • @param gridType
  •        grid type
    
  • @return grid type line color

set​Color(_:​_:​)

public func setColor(_ gridType: GridType, _ color: UIColor)  
  • Set the grid type precision line color
  • @param gridType
  •        grid type
    
  • @param color
  •        grid line color
    

width(_:​)

public func width(_ gridType: GridType) -> Double  
  • Get the grid type precision line width
  • @param gridType
  •        grid type
    
  • @return grid type line width

set​Width(_:​_:​)

public func setWidth(_ gridType: GridType, _ width: Double)  
  • Set the grid type precision line width
  • @param gridType
  •        grid type
    
  • @param width
  •        grid line width
    

labeler()

public func labeler() -> GridLabeler?  
  • Get the grid labeler
  • @return grid labeler

set​Labeler(_:​)

public func setLabeler(_ labeler: GridLabeler?)  
  • Set the grid labeler
  • @param labeler
  •        grid labeler
    

lines(_:​_:​)

public func lines(_ tile: GridTile, _ zone: GridZone) -> [MGRSLine]?  
  • Get the lines for the tile and zone
  • @param tile
  •        tile
    
  • @param zone
  •        grid zone
    
  • @return lines

lines(_:​_:​_:​)

public func lines(_ zoom: Int, _ tileBounds: Bounds, _ zone: GridZone) -> [MGRSLine]?  
  • Get the lines for the zoom, tile bounds, and zone
  • @param zoom
  •        zoom level
    
  • @param tileBounds
  •        tile bounds
    
  • @param zone
  •        grid zone
    
  • @return lines

lines(_:​_:​)

public func lines(_ tileBounds: Bounds, _ zone: GridZone) -> [MGRSLine]?  
  • Get the lines for the tile bounds and zone
  • @param tileBounds
  •        tile bounds
    
  • @param zone
  •        grid zone
    
  • @return lines

labels(_:​_:​)

public func labels(_ tile: GridTile, _ zone: GridZone) -> [GridLabel]?  
  • Get the labels for the tile and zone
  • @param tile
  •        tile
    
  • @param zone
  •        grid zone
    
  • @return labels

labels(_:​_:​_:​)

public func labels(_ zoom: Int, _ tileBounds: Bounds, _ zone: GridZone) -> [GridLabel]?  
  • Get the labels for the zoom, tile bounds, and zone
  • @param zoom
  •        zoom level
    
  • @param tileBounds
  •        tile bounds
    
  • @param zone
  •        grid zone
    
  • @return labels

equals(_:​)

public override func equals(_ grid: BaseGrid) -> Bool  

hash(into:​)

public override func hash(into hasher: inout Hasher)  

compare(_:​)

public override func compare(_ grid: BaseGrid) -> Bool  

precision​Compare()

public func precisionCompare() -> Int  
  • Get the precision in meters
  • @return precision meters