mgrs-ios 1.1.6 Documentation

Class Grid​Tile

public class GridTile  
  • Grid Tile

Initializers

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

public convenience init(_ width: Int, _ height: Int, _ x: Int, _ y: Int, _ zoom: Int)  
  • Initialize
  • @param width
  •        tile width
    
  • @param height
  •        tile height
    
  • @param x
  •        x coordinate
    
  • @param y
  •        y coordinate
    
  • @param zoom
  •        zoom level
    

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

public init(_ width: Int, _ height: Int, _ x: Int, _ y: Int, _ zoom: Int, _ gridZoom: Int)  
  • Initialize
  • @param width
  •        tile width
    
  • @param height
  •        tile height
    
  • @param x
  •        x coordinate
    
  • @param y
  •        y coordinate
    
  • @param zoom
  •        zoom level
    
  • @param gridZoom
  •        grid zoom level if different from the XYZ zoom level
    

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

public convenience init(_ width: Int, _ height: Int, _ bounds: Bounds)  
  • Initialize
  • @param width
  •        tile width
    
  • @param height
  •        tile height
    
  • @param bounds
  •        tile bounds
    

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

public init(_ width: Int, _ height: Int, _ bounds: Bounds, _ gridZoomOffset: Int)  
  • Initialize
  • @param width
  •        tile width
    
  • @param height
  •        tile height
    
  • @param bounds
  •        tile bounds
    
  • @param gridZoomOffset
  •        grid zoom level offset from bounds determined zoom level
    

Properties

width

public var width: Int
  • Tile width

height

public var height: Int
  • Tile height

zoom

public var zoom: Int
  • Grid Zoom level

bounds

public var bounds: Bounds
  • Bounds

Methods

bounds(_:​)

public func bounds(_ unit: Unit) -> Bounds  
  • Get the bounds in the units
  • @param unit
  •        units
    
  • @return bounds in units

bounds​Degrees()

public func boundsDegrees() -> Bounds  
  • Get the bounds in degrees
  • @return bounds in degrees

bounds​Meters()

public func boundsMeters() -> Bounds  
  • Get the bounds in meters
  • @return bounds in meters

pixel(_:​)

public func pixel(_ point: GridPoint) -> Pixel  
  • Get the point pixel location in the tile
  • @param point
  •        point
    
  • @return pixel

xPixel(_:​)

public func xPixel(_ longitude: Double) -> Float  
  • Get the longitude in meters x pixel location in the tile
  • @param longitude
  •        longitude in meters
    
  • @return x pixel

yPixel(_:​)

public func yPixel(_ latitude: Double) -> Float  
  • Get the latitude (in meters) y pixel location in the tile
  • @param latitude
  •        latitude in meters
    
  • @return y pixel