Class
GridPoint
public class GridPoint: SFPoint
- Point
Relationships
Conforms To
SFPoint
Initializers
init(_:_:)
public convenience init(_ longitude: Double, _ latitude: Double)
- Initialize, in DEGREE units
- @param longitude
-
longitude
- @param latitude
-
latitude
init(_:_:_:)
public init(_ longitude: Double, _ latitude: Double, _ unit: Unit)
- Initialize
- @param longitude
-
longitude
- @param latitude
-
latitude
- @param unit
-
unit
init(_:_:)
public init(_ point: SFPoint, _ unit: Unit)
- Initialize
- @param point
-
point to copy
- @param unit
-
unit
init?(coder:)
public required init?(coder: NSCoder)
Properties
hash
public override var hash: Int
Methods
degrees(_:_:)
public static func degrees(_ longitude: Double, _ latitude: Double) -> GridPoint
- Create a point in degrees
- @param longitude
-
longitude in degrees
- @param latitude
-
latitude in degrees
- @return point in degrees
meters(_:_:)
public static func meters(_ longitude: Double, _ latitude: Double) -> GridPoint
- Create a point in meters
- @param longitude
-
longitude in meters
- @param latitude
-
latitude in meters
- @return point in meters
toUnit(_:_:_:_:)
public static func toUnit(_ fromUnit: Unit, _ longitude: Double, _ latitude: Double, _ toUnit: Unit) -> GridPoint
- Create a point from a coordinate in a unit to another unit
- @param fromUnit
-
unit of provided coordinate
- @param longitude
-
longitude
- @param latitude
-
latitude
- @param toUnit
-
desired unit
- @return point in unit
toUnit(_:_:_:)
- Create a point from a coordinate in an opposite unit to another unit
- @param longitude
-
longitude
- @param latitude
-
latitude
- @param unit
-
desired unit
- @return point in unit
degreesToMeters(_:_:)
public static func degreesToMeters(_ longitude: Double, _ latitude: Double) -> GridPoint
- Create a point converting the degrees coordinate to meters
- @param longitude
-
longitude in degrees
- @param latitude
-
latitude in degrees
- @return point in meters
metersToDegrees(_:_:)
public static func metersToDegrees(_ longitude: Double, _ latitude: Double) -> GridPoint
- Create a point converting the meters coordinate to degrees
- @param longitude
-
longitude in meters
- @param latitude
-
latitude in meters
- @return point in degrees
isUnit(_:)
public func isUnit(_ unit: Unit) -> Bool
- Is in the provided unit type
- @param unit
-
unit
- @return true if in the unit
toUnit(_:)
- Convert to the unit
- @param unit
-
unit
- @return point in units, same point if equal units
toDegrees()
public func toDegrees() -> GridPoint
- Convert to degrees
- @return point in degrees, same point if already in degrees
toMeters()
public func toMeters() -> GridPoint
- Convert to meters
- @return point in meters, same point if already in meters
pixel(_:)
- Get the pixel where the point fits into tile
- @param tile
-
tile
- @return pixel
pixel(_:_:_:)
- Get the pixel where the point fits into the bounds
- @param width
-
width
- @param height
-
height
- @param bounds
-
bounds
- @return pixel
toCoordinate()
public func toCoordinate() -> CLLocationCoordinate2D
- Convert to a location coordinate
- @return coordinate
mutableCopy(with:)
public override func mutableCopy(with zone: NSZone? = nil) -> Any
encode(with:)
public override func encode(with coder: NSCoder)
isEqual(_:)
public func isEqual(_ point: GridPoint?) -> Bool
isEqual(_:)
public override func isEqual(_ object: Any?) -> Bool