mgrs-ios 1.1.6 Documentation

Class Base​Grids

open class BaseGrids  
  • Grids
BaseGrids BaseGrids Grids Grids Grids->BaseGrids

Subclasses

Grids

Initializers

init(_:​)

public init(_ properties: GridProperties)  
  • Initialize
  • @param properties
  •        grid properties
    

Properties

properties

public let properties: GridProperties
  • Grid properties

Methods

default​Width()

open func defaultWidth() -> Double  
  • Get the default grid line width
  • @return width

grids()

open func grids() -> [BaseGrid]  
  • Get the grids
  • @return grids

new​Zoom​Grids(_:​)

open func newZoomGrids(_ zoom: Int) -> BaseZoomGrids  
  • Create a new zoom grids
  • @param zoom
  •        zoom level
    
  • @return zoom grids

load​Grid(_:​_:​_:​_:​)

public func loadGrid(_ grid: BaseGrid, _ gridKey: String, _ enabled: Bool?, _ labeler: Labeler?)  
  • Load the grid
  • @param grid
  •        name
    
  • @param gridKey
  •        grid name key
    
  • @param enabled
  •        enable created grids
    
  • @param labeler
  •        grid labeler
    

load​Labeler(_:​_:​)

public func loadLabeler(_ labeler: Labeler, _ gridKey: String)  
  • Load the labeler
  • @param labeler
  •        labeler
    
  • @param gridKey
  •        grid name key
    

load​Grid​Style​Color(_:​_:​)

public func loadGridStyleColor(_ gridKey: String, _ gridKey2: String) -> UIColor?  
  • Load the grid style color
  • @param gridKey
  •        grid name key
    
  • @param gridKey2
  •        second grid name key
    
  • @return color

load​Grid​Style​Width(_:​_:​)

public func loadGridStyleWidth(_ gridKey: String, _ gridKey2: String) -> Double?  
  • Load the grid style width
  • @param gridKey
  •        grid name key
    
  • @param gridKey2
  •        second grid name key
    
  • @return width

grid​Style(_:​_:​_:​)

public func gridStyle(_ color: UIColor?, _ width: Double?, _ grid: BaseGrid) -> GridStyle  
  • Get a combined grid style from the provided color, width, and grid
  • @param color
  •        color
    
  • @param width
  •        width
    
  • @param grid
  •        grid
    
  • @return grid style

create​Zoom​Grids()

public func createZoomGrids()  
  • Create the zoom level grids

grids(_:​)

open func grids(_ zoom: Int) -> BaseZoomGrids  
  • Get the grids for the zoom level
  • @param zoom
  •        zoom level
    
  • @return grids

enable​Grids(_:​)

public func enableGrids(_ grids: [BaseGrid])  
  • Enable grids
  • @param grids
  •        grids
    

disable​Grids(_:​)

public func disableGrids(_ grids: [BaseGrid])  
  • Disable grids
  • @param grids
  •        grids
    

enable(_:​)

public func enable(_ grid: BaseGrid)  
  • Enable the grid
  • @param grid
  •        grid
    

disable(_:​)

public func disable(_ grid: BaseGrid)  
  • Disable the grid
  • @param grid
  •        grid
    

zoom​Levels()

public func zoomLevels() -> [Int]  
  • Get the sorted zoom levels
  • @return zoom levels

min​Zoom​Level()

public func minZoomLevel() -> Int  
  • Get the min zoom level
  • @return min zoom level

max​Zoom​Level()

public func maxZoomLevel() -> Int  
  • Get the min zoom level
  • @return min zoom level

set​Min​Zoom(_:​_:​)

public func setMinZoom(_ grid: BaseGrid, _ minZoom: Int)  
  • Set the grid minimum zoom
  • @param grid
  •        grid
    
  • @param minZoom
  •        minimum zoom
    

set​Max​Zoom(_:​_:​)

public func setMaxZoom(_ grid: BaseGrid, _ maxZoom: Int?)  
  • Set the grid maximum zoom
  • @param grid
  •        grid
    
  • @param maxZoom
  •        maximum zoom
    

set​Zoom​Range(_:​_:​_:​)

public func setZoomRange(_ grid: BaseGrid, _ minZoom: Int, _ maxZoom: Int?)  
  • Set the grid zoom range
  • @param grid
  •        grid
    
  • @param minZoom
  •        minimum zoom
    
  • @param maxZoom
  •        maximum zoom
    

enable​All​Labelers()

public func enableAllLabelers()  
  • Enable all grid labelers

set​All​Label​Buffers(_:​)

public func setAllLabelBuffers(_ buffer: Double)  
  • Set all label grid edge buffers
  • @param buffer
  •        label buffer (greater than or equal to 0.0 and less than 0.5)