# Class Hyperlink

A hyperlink associated with a feature or layer.

#### Hierarchy

- SerializableBase<HyperlinkProperties, this> & ObservableMixin<this>
  - Hyperlink

#####
Index

### Constructors

constructor

### Accessors

iconUrl
target
text
tooltip
url

### Methods

_getSerializableProperties
_toPropertyDef
assignProperties
assignPropertiesAsync
finishAssignProperties
getDefault
getDefaults
getReferencedFields
getSerializableProperties
toJSON

##
Constructors

### constructor

- new Hyperlink(properties): Hyperlink

- Creates a new Hyperlink instance with the given properties.

  #### Parameters

  - properties: HyperlinkProperties

    The properties to set.

  #### Returns Hyperlink

  Overrides observable(SerializableBase<HyperlinkProperties>).constructor

##
Accessors

### iconUrl

- get iconUrl(): string

- An optional URL to an icon image that will be displayed with the link.

  #### Returns string

- set iconUrl(iconUrl): void

- #### Parameters

  - iconUrl: string

  #### Returns void

### target

- get target(): string

- The target for the link (e.g. "_blank").

  #### Returns string

- set target(target): void

- #### Parameters

  - target: string

  #### Returns void

### text

- get text(): string

- The human-readable text of the link.

  #### Returns string

- set text(text): void

- #### Parameters

  - text: string

  #### Returns void

### tooltip

- get tooltip(): string

- A tooltip that will appear when a user hovers over the link.

  #### Returns string

- set tooltip(tooltip): void

- #### Parameters

  - tooltip: string

  #### Returns void

### url

- get url(): string

- The URL to link to.

  #### Returns string

- set url(url): void

- #### Parameters

  - url: string

  #### Returns void

##
Methods

### `Protected`_getSerializableProperties

- _getSerializableProperties(): PropertyDefs<HyperlinkProperties>

- The property keys and their metadata that are used to implement serializing and deserializing the class instance.

  #### Returns PropertyDefs<HyperlinkProperties>

  Overrides observable(SerializableBase<HyperlinkProperties>)._getSerializableProperties

### `Protected`_toPropertyDef

- _toPropertyDef<T>(def): PropertyDef<T>

- Converts the value to a PropertyDef object.

  #### Type Parameters

  - T

  #### Parameters

  - def: PropertyDefSerializeMode | PropertyDefSerializeMode[] | PropertyDef<T>

    The value to convert.

  #### Returns PropertyDef<T>

  Inherited from observable(SerializableBase<HyperlinkProperties>)._toPropertyDef

### assignProperties

- assignProperties(properties): void

- #### Parameters

  - properties: Partial<HyperlinkProperties>

  #### Returns void

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).assignProperties

### assignPropertiesAsync

- assignPropertiesAsync(properties): Promise<void>

- #### Parameters

  - properties: Partial<HyperlinkProperties>

  #### Returns Promise<void>

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).assignPropertiesAsync

### finishAssignProperties

- finishAssignProperties(): Promise<void>

- #### Returns Promise<void>

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).finishAssignProperties

### getDefault

- getDefault<K>(key): HyperlinkProperties[K]

- #### Type Parameters

  - K extends keyof HyperlinkProperties

  #### Parameters

  - key: K

  #### Returns HyperlinkProperties[K]

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).getDefault

### getDefaults

- getDefaults(): HyperlinkProperties

- #### Returns HyperlinkProperties

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).getDefaults

### getReferencedFields

- getReferencedFields(): string[]

- Returns a list of fields references contained in the hyperlink properties.

  #### Returns string[]

### getSerializableProperties

- getSerializableProperties(serializeMode?): PropertyDefs<HyperlinkProperties>

- Returns the serializable properties.

  #### Parameters

  - serializeMode: SerializeMode = "all"

    Optional. If specified, only properties that support the given serialization mode will be returned.

  #### Returns PropertyDefs<HyperlinkProperties>

  Inherited from observable(SerializableBase<HyperlinkProperties>).getSerializableProperties

### toJSON

- toJSON(serializeMode?): HyperlinkProperties

- #### Parameters

  - serializeMode: SerializeMode = "all"

  #### Returns HyperlinkProperties

  #### Inherit Doc

  Inherited from observable(SerializableBase<HyperlinkProperties>).toJSON