diff --git a/src/ui/marker.js b/src/ui/marker.js index 55484adb013..4904799baee 100644 --- a/src/ui/marker.js +++ b/src/ui/marker.js @@ -216,9 +216,13 @@ export default class Marker extends Evented { } /** - * Attaches the marker to a map + * Attaches the `Marker` to a `Map` object. * @param {Map} map The Mapbox GL JS map to add the marker to. * @returns {Marker} `this` + * @example + * var marker = new mapboxgl.Marker() + * .setLngLat([30.5, 50.5]) + * .addTo(map); // add the marker to the map */ addTo(map: Map) { this.remove();