Skip to content

Commit

Permalink
Adds a queryTerrainElevation example to API doc (#10748)
Browse files Browse the repository at this point in the history
* add queryTerrainElevation example to API doc

* add related example to setFog
  • Loading branch information
Dom Brassey authored Jun 4, 2021
1 parent 78ed8de commit e9ee222
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/ui/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -2210,6 +2210,7 @@ class Map extends Camera {
* "color": 'white',
* "horizon-blend": 0.1
* });
* @see [Add fog to a map](https://docs.mapbox.com/mapbox-gl-js/example/add-fog/)
*/
setFog(fog: FogSpecification) {
this._lazyInitEmptyStyle();
Expand Down Expand Up @@ -2256,6 +2257,7 @@ class Map extends Camera {
* @example
* var coordinate = [-122.420679, 37.772537];
* var elevation = map.queryTerrainElevation(coordinate);
* @see [Query terrain elevation](https://docs.mapbox.com/mapbox-gl-js/example/query-terrain-elevation/)
*/
queryTerrainElevation(lnglat: LngLatLike, options: ElevationQueryOptions): number | null {
const elevation = this.transform.elevation;
Expand Down

0 comments on commit e9ee222

Please sign in to comment.