WaypointEntry
open class WaypointEntry : NSObject
Wrapper class for a NMAWaypoint
object and an optional name. When the name is not specified,
the NMAWaypoint
object’s coordinates are used to name the entry. Specifying a name can be
useful to show, for example, POI names with addresses or hints like Select Location
or Home
.
-
A string representation of the entry which is useful for debugging.
Declaration
Swift
override open var description: String { get }
-
The
NMAWaypoint
object for this entry.Declaration
Swift
public private(set) var waypoint: NMAWaypoint
-
Optional street address of the entry.
Declaration
Swift
public private(set) var streetAddress: String?
-
The display name of the entry.
Declaration
Swift
public var name: String
-
Sets whether the entry is draggable or not.
Declaration
Swift
public var draggable: Bool
-
Sets whether the entry is removable or not.
Declaration
Swift
public var removable: Bool
-
Creates a
WaypointEntry
object with aNMAWaypoint
object, name and optional street address.Declaration
Swift
public init(_ waypoint: NMAWaypoint, name: String, streetAddress: String? = nil)
Parameters
waypoint
The
NMAWaypoint
object.name
The name for this
NMAWaypoint
object.streetAddress
Optional street address for this
NMAWaypoint
object. -
Creates a
WaypointEntry
object with aNMAWaypoint
object.Note
The name associated with the waypoint is a string representation of its coordinates.Note
The latitude and longitude values are rounded to five decimal digits.Declaration
Swift
public convenience init(_ waypoint: NMAWaypoint)
Parameters
waypoint
The
NMAWaypoint
object. -
Determines if this entry holds a valid
NMAWaypoint
or not. It is valid when the latitude is in the range [-90, 0), (0, +90] and the longitude is in the range [-180, 0), (0, +180]. Note that the default values of theNMAWaypoint
, latitude = 0 and longitude = 0, are considered as invalid.Declaration
Swift
public func isValid() -> Bool
Return Value
True, if the
NMAWaypoint
contains a valid coordinate, false otherwise.