sww
    Preparing search index...

    Class HikingEditor

    Hierarchy

    • EventTarget
      • HikingEditor
    Index

    Constructors

    Accessors

    • get discipline(): Discipline

      Returns Discipline

    • set discipline(value: Discipline): void

      Parameters

      • value: Discipline

      Returns void

    • get edit(): boolean

      Returns boolean

    • set edit(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    • get snapping(): boolean

      Returns boolean

    • set snapping(value: boolean): void

      Parameters

      • value: boolean

      Returns void

    Methods

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • Computes the properties (statistics) of a track, including total time, distance, ascent, descent, physical demand, time and distance for each stopover.

      Returns TrackProperties

    • Returns boolean

    • Delete the hiking from the server

      Returns void

    • Delete a line part by its index or the active part if no index is provided.

      Parameters

      • partIndex: number

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      • event: Event

      Returns boolean

    • Returns HikingProfile

    • Returns the uuid of the hiking. If the hiking is not saved yet, this function returns undefined.

      Returns string | undefined

    • Handle import of GPX and KML files

      Parameters

      • file: File

      Returns void

    • Load the hiking from the server.

      Parameters

      • uuid: string | undefined

      Returns Promise<void>

    • Redo the last action

      Returns void

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void

    • Remove a stopover from the stopover list

      Parameters

      • uid: string

      Returns void

    • Returns void

    • Reverse the track

      Returns void

    • Create or update the hiking to the server

      Returns Promise<string>

    • Set the distance of a stopover in meters or reset it to the computed value (if undefined is passed)

      Parameters

      • uid: string
      • distance: string | number

      Returns void

    • Set the duration of a stopover in minutes or reset it to the computed value (if undefined is passed)

      Parameters

      • uid: string
      • duration: string | number

      Returns void

    • Set the features of a stopover

      Parameters

      • uid: string
      • features: unknown[]

      Returns void

    • Change the name of a stopover

      Parameters

      • uid: string
      • name: string

      Returns void

    • Set the type of the hiking. The type can be one of hiking, hiking_activity or hiking_proposition.

      Parameters

      • type: "hiking" | "hiking_activity" | "hiking_proposition"

      Returns void

    • Undo the last action

      Returns void

    • Update the hiking properties.

      • Adds new properties that don't exist in hikingProperties
      • Updates existing properties with new values
      • Removes properties when their value is undefined

      Parameters

      • properties: Record<string, unknown>

      Returns void