# # Popup

A popup component.

Extends Object
(opens new window).

    new Popup()

## # Instance Members

### # `addTo(map)`

Adds the popup to a map.

#### # Parameters

`map` (`Map`) The Mini Tokyo 3D map to add the popup to.

#### # Returns

`Popup`: Returns itself to allow for method chaining.

### # `remove()`

Removes the popup from the map it has been added to.

#### # Returns

`Popup`: Returns itself to allow for method chaining.

### # `setHTML(html)`

Sets the popup's content to the HTML provided as a string.

This method does not perform HTML filtering or sanitization, and must be used only with trusted content.

#### # Parameters

`html` (`string`
(opens new window)) A string representing HTML content for the popup.

#### # Returns

`Popup`: Returns itself to allow for method chaining.

### # `setLngLat(lnglat)`

Sets the geographical location of the popup's anchor, and moves the popup to it.

#### # Parameters

`lnglat` (`LngLatLike`
(opens new window)) The geographical location to set as the popup's anchor.

#### # Returns

`Popup`: Returns itself to allow for method chaining.