From b09ab1e6528cd1a08cecdc04cc2061837e86407b Mon Sep 17 00:00:00 2001 From: Jeremy Stratman Date: Mon, 13 Apr 2020 16:19:09 -0700 Subject: [PATCH] added examples to get- and setLayoutProperty --- src/ui/map.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ui/map.js b/src/ui/map.js index c1e5eee4dad..ef4c7b86760 100755 --- a/src/ui/map.js +++ b/src/ui/map.js @@ -1867,6 +1867,7 @@ class Map extends Camera { * @returns {Map} `this` * @example * map.setLayoutProperty('my-layer', 'visibility', 'none'); + * @see [Show and hide layers](https://docs.mapbox.com/mapbox-gl-js/example/toggle-layers/) */ setLayoutProperty(layerId: string, name: string, value: any, options: StyleSetterOptions = {}) { this.style.setLayoutProperty(layerId, name, value, options); @@ -1891,6 +1892,9 @@ class Map extends Camera { * @param {Object} [options] Options object. * @param {boolean} [options.validate=true] Whether to check if the filter conforms to the Mapbox GL Style Specification. Disabling validation is a performance optimization that should only be used if you have previously validated the values you will be passing to this function. * @returns {Map} `this` + * @example + * map.getLayoutProperty('my-layer', 'visibility'); + * @see [Show and hide layers](https://docs.mapbox.com/mapbox-gl-js/example/toggle-layers/) */ setLight(light: LightSpecification, options: StyleSetterOptions = {}) { this._lazyInitEmptyStyle();