Skip to content

Commit

Permalink
[docsprint] Add inline snippet to marker#addTo (#9592)
Browse files Browse the repository at this point in the history
  • Loading branch information
HeyStenson authored Apr 20, 2020
1 parent 9f18918 commit d54cef2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/ui/marker.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit d54cef2

Please sign in to comment.