GPXLink

public final class GPXLink : GPXElement, Codable

A value type that can hold a web link to a external resource, or external information about a certain attribute.

In addition to having a URL as its attribute, it also accepts the following as child tag:

  • type of content
  • text of web link (probably a description kind of thing)
  • Text of hyperlink

    Declaration

    Swift

    public var text: String?
  • Mime type of content (image/jpeg)

    Declaration

    Swift

    public var mimetype: String?
  • URL of hyperlink

    Declaration

    Swift

    public var href: String?
  • Default Initializer.

    Declaration

    Swift

    public required init()
  • Initializes with a web link attribute

    Declaration

    Swift

    public init(withHref href: String)

    Parameters

    href

    Hypertext Reference. Basically, a web link which can be considered as a reference to whichever content, including metadata, waypoints, for example.

  • Initializes with a URL.

    This initializer is similar to init(withHref:), except, this method checks on whether if the input URL is valid or not. It also modifies the type attribute as ‘Website’ if identified to have a web page extension.

    Declaration

    Swift

    public init(withURL url: URL?)

    Parameters

    url

    input URL, intended as a web link reference.