Skip to content

Instantly share code, notes, and snippets.

@mapsam
Created September 13, 2016 20:39
Show Gist options
  • Save mapsam/18b9f32e88e390d57b15c5e8785988f5 to your computer and use it in GitHub Desktop.
Save mapsam/18b9f32e88e390d57b15c5e8785988f5 to your computer and use it in GitHub Desktop.
LatLngBounds doc.js example
/**
 * A `LngLatBounds` object represents a geographical bounding box,
 * defined by its southwest and northeast points in longitude and latitude.
 *
 * If no arguments are provided to the constructor, a `null` bounding box is created.
 *
 * Note that any Mapbox GL method that accepts a `LngLatBounds` object as an argument or option
 * can also accept an `Array` of two [`LngLatLike`](#LngLatLike) constructs and will perform an implicit conversion.
 * This flexible type is documented as [`LngLatBoundsLike`](#LngLatBoundsLike).
 *
 * ### This is an h3
 *
 * * list item one [with a link](http://mapsam.com)
 * * list item 2
 * * list item tres
 *
 * @class LngLatBounds
 * @param {LngLatLike} sw The southwest corner of the bounding box.
 * @param {LngLatLike} ne The northeast corner of the bounding box.
 * @example
 * var sw = new mapboxgl.LngLat(-73.9876, 40.7661);
 * var ne = new mapboxgl.LngLat(-73.9397, 40.8002);
 * var llb = new mapboxgl.LngLatBounds(sw, ne);
 */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment