mgrs-ios 1.1.6 Documentation

Class Labeler

open class Labeler  
  • Grid Labeler
Labeler Labeler GridLabeler GridLabeler GridLabeler->Labeler

Subclasses

GridLabeler

Initializers

init(_:​_:​_:​_:​)

public convenience init(_ minZoom: Int, _ color: UIColor?, _ textSize: Double, _ buffer: Double)  
  • Initialize
  • @param minZoom
  •        minimum zoom
    
  • @param color
  •        label color
    
  • @param textSize
  •        label text size
    
  • @param buffer
  •        grid edge buffer (greater than or equal to 0.0 and less than
    
  •        0.5)
    

init(_:​_:​_:​_:​_:​)

public convenience init(_ minZoom: Int, _ maxZoom: Int?, _ color: UIColor?, _ textSize: Double, _ buffer: Double)  
  • Initialize
  • @param minZoom
  •        minimum zoom
    
  • @param maxZoom
  •        maximum zoom
    
  • @param color
  •        label color
    
  • @param textSize
  •        label text size
    
  • @param buffer
  •        grid edge buffer (greater than or equal to 0.0 and less than
    
  •        0.5)
    

init(_:​_:​_:​_:​_:​_:​)

public init(_ enabled: Bool, _ minZoom: Int, _ maxZoom: Int?, _ color: UIColor?, _ textSize: Double, _ buffer: Double)  
  • Initialize
  • @param enabled
  •        enabled labeler
    
  • @param minZoom
  •        minimum zoom
    
  • @param maxZoom
  •        maximum zoom
    
  • @param color
  •        label color
    
  • @param textSize
  •        label text size
    
  • @param buffer
  •        grid edge buffer (greater than or equal to 0.0 and less than
    
  •        0.5)
    

Properties

enabled

public var enabled: Bool
  • Enabled labeler

min​Zoom

public var minZoom: Int
  • Minimum zoom level

max​Zoom

public var maxZoom: Int? 
  • Maximum zoom level

color

public var color: UIColor? 
  • Label color

text​Size

public var textSize: Double
  • Label text size

buffer

public var buffer: Double  
  • Grid edge buffer (greater than or equal to 0.0 and less than 0.5)

Methods

has​Max​Zoom()

public func hasMaxZoom() -> Bool  
  • Has a maximum zoom level
  • @return true if has a maximum, false if unbounded

is​Within(_:​)

public func isWithin(_ zoom: Int) -> Bool  
  • Is the zoom level within the grid zoom range
  • @param zoom
  •        zoom level
    
  • @return true if within range