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
NMAWaypointobject 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
WaypointEntryobject with aNMAWaypointobject, name and optional street address.Declaration
Swift
public init(_ waypoint: NMAWaypoint, name: String, streetAddress: String? = nil)Parameters
waypointThe
NMAWaypointobject.nameThe name for this
NMAWaypointobject.streetAddressOptional street address for this
NMAWaypointobject. -
Creates a
WaypointEntryobject with aNMAWaypointobject.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
waypointThe
NMAWaypointobject. -
Determines if this entry holds a valid
NMAWaypointor 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() -> BoolReturn Value
True, if the
NMAWaypointcontains a valid coordinate, false otherwise.
View on GitHub
WaypointEntry Class Reference