diff --git a/src/ui/popup.js b/src/ui/popup.js index 8acb87e2192..a78209337b2 100644 --- a/src/ui/popup.js +++ b/src/ui/popup.js @@ -235,8 +235,13 @@ export default class Popup extends Evented { } /** - * Tracks the popup anchor to the cursor position, on screens with a pointer device (will be hidden on touchscreens). Replaces the setLngLat behavior. - * For most use cases, `closeOnClick` and `closeButton` should also be set to `false` here. + * Tracks the popup anchor to the cursor position on screens with a pointer device (it will be hidden on touchscreens). Replaces the `setLngLat` behavior. + * For most use cases, set `closeOnClick` and `closeButton` to `false`. + * @example + * var popup = new mapboxgl.Popup({ closeOnClick: false, closeButton: false }) + * .setHTML("

Hello World!

") + * .trackPointer() + * .addTo(map); * @returns {Popup} `this` */ trackPointer() {